From: Viktor M. <mih...@us...> - 2005-07-27 16:23:48
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3560 Modified Files: Makefile.am brokerUpc.c configure.ac msgqueue.c msgqueue.h providerDrv.c providerMgr.c sfcb.spec.in Log Message: Bugs fixed: 1246130, 1246009. Indications can now be disabled effectively. Endianness sensitivity removed from msgqueue data structures. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure.ac 13 Jul 2005 14:26:02 -0000 1.15 +++ configure.ac 27 Jul 2005 16:22:38 -0000 1.16 @@ -21,7 +21,7 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Small Footprint CIM Broker, 0.9.0, sbl...@li..., sblim-sfcb) +AC_INIT(Small Footprint CIM Broker, 0.9.0b, sbl...@li..., sblim-sfcb) AC_CONFIG_SRCDIR([providerDrv.c]) AM_INIT_AUTOMAKE @@ -101,7 +101,8 @@ # Checks for libraries. AC_CHECK_LIB(pthread,main) AC_CHECK_LIB(dl,main) -if test "$enable_indications" = "yes"; then +if test "$enable_indications" == "yes"; then + AC_DEFINE(HAVE_INDICATIONS,,[Indication support enabled.]) AC_CHECK_LIB(curl,main) fi @@ -158,6 +159,7 @@ AC_SUBST(MOFC_DIR) fi +AM_CONDITIONAL(INDICATIONS,[test "$enable_indications" == "yes"]) AM_CONDITIONAL(JDBC,[test "$enable_jdbc" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcb.cfg.pre getSchema.sh.pre sfcb.init-redhat sfcb.init-suse sfcb.init-none]) @@ -167,7 +169,7 @@ echo sfcb configuration complete echo configuration features: echo -e "debug"\\t"${enable_debug:-no}" -echo -e "indications"\\t"yes (cannot be disabled currently)" +echo -e "indications"\\t"${enable_indications}" echo -e "ssl"\\t"${enable_ssl:-no}" echo -e "jdbc"\\t"${enable_jdbc:-no}" echo ====================================================== Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile.am 13 Jul 2005 08:41:22 -0000 1.27 +++ Makefile.am 27 Jul 2005 16:22:22 -0000 1.28 @@ -36,6 +36,7 @@ SUBDIRS=. $(MOFC_DIR) +if INDICATIONS lib_LTLIBRARIES = \ libsfcBrokerCore.la \ libsfcInternalProvider.la \ @@ -45,6 +46,16 @@ libsfcHttpAdapter.la \ libsfcBasicAuthentication.la \ libsfcIndCIMXMLHandler.la +else +lib_LTLIBRARIES = \ + libsfcBrokerCore.la \ + libsfcInternalProvider.la \ + libsfcInteropProvider.la \ + libsfcClassProvider.la \ + libsfcCimXmlCodec.la \ + libsfcHttpAdapter.la \ + libsfcBasicAuthentication.la +endif sbin_PROGRAMS = \ sfcbd @@ -173,7 +184,7 @@ libsfcIndCIMXMLHandler_la_SOURCES = \ indCIMXMLHandler.c \ indCIMXMLExport.c -libsfcIndCIMXMLHandler_la_LIBADD=-lsfcBrokerCore -lsfcInternalProvider -lsfcCimXmlCodec -lsfcHttpAdapter -lcurl +libsfcIndCIMXMLHandler_la_LIBADD=-lsfcBrokerCore -lsfcInternalProvider -lsfcCimXmlCodec -lsfcHttpAdapter libsfcClassProvider_la_SOURCES = \ classProvider.c Index: msgqueue.h =================================================================== RCS file: /cvsroot/sblim/sfcb/msgqueue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- msgqueue.h 13 Apr 2005 15:15:41 -0000 1.2 +++ msgqueue.h 27 Jul 2005 16:22:42 -0000 1.3 @@ -55,13 +55,8 @@ #endif typedef struct _spMessageHdr { - union { - long type; - struct { - short type; - short xtra; - } ctl; - } type; + short type; + short xtra; int returnS; unsigned long totalSize; unsigned long segments; Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- providerDrv.c 26 Jul 2005 11:15:26 -0000 1.17 +++ providerDrv.c 27 Jul 2005 16:22:42 -0000 1.18 @@ -20,8 +20,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <signal.h> #include <pthread.h> #include <time.h> @@ -39,6 +37,11 @@ #include "queryOperation.h" #include "selectexp.h" #include "control.h" +#include "config.h" + +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif #define PROVCHARS(p) (p && *((char*)p)) ? (char*)p : NULL Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- brokerUpc.c 31 May 2005 09:23:50 -0000 1.2 +++ brokerUpc.c 27 Jul 2005 16:22:38 -0000 1.3 @@ -20,8 +20,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <stdio.h> #include <stdlib.h> #include <error.h> @@ -33,6 +31,11 @@ #include "objectImpl.h" #include "msgqueue.h" #include "utilft.h" +#include "config.h" + +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif #ifdef SFCB_INCL_INDICATION_SUPPORT #include "selectexp.h" @@ -46,7 +49,9 @@ extern void memLinkObjectPath(CMPIObjectPath *op); extern ProviderInfo *activProvs; +#ifdef SFCB_INCL_INDICATION_SUPPORT extern NativeSelectExp *activFilters; +#endif extern CMPIObjectPath *TrackedCMPIObjectPath(const char *nameSpace, const char *className, CMPIStatus * rc); extern void setStatus(CMPIStatus *st, CMPIrc rc, char *msg); @@ -136,9 +141,9 @@ _SFCB_RETURN(st); #else + _SFCB_ENTER(TRACE_INDPROVIDER | TRACE_UPCALLS, "deliverIndication"); CMPIStatus rci = { CMPI_RC_ERR_NOT_SUPPORTED, NULL }; - if (rc) *rc = rci; - _SFCB_RETURN(NULL); + _SFCB_RETURN(rci); #endif } Index: sfcb.spec.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.spec.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- sfcb.spec.in 20 Jul 2005 08:40:38 -0000 1.11 +++ sfcb.spec.in 27 Jul 2005 16:22:47 -0000 1.12 @@ -38,7 +38,7 @@ %build -%configure --disable-debug +%configure --enable-debug --disable-indications make %install @@ -89,6 +89,7 @@ exit 0 %files schema +%defattr(-,root,root) %{_datadir}/sfcb/CIM %files -f _pkg_list Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- providerMgr.c 13 Jul 2005 14:26:02 -0000 1.13 +++ providerMgr.c 27 Jul 2005 16:22:45 -0000 1.14 @@ -21,8 +21,6 @@ */ -#define SFCB_INCL_INDICATION_SUPPORT 1 - #include <signal.h> #include <time.h> @@ -38,6 +36,10 @@ #include "selectexp.h" #include "config.h" +#ifdef HAVE_INDICATIONS +#define SFCB_INCL_INDICATION_SUPPORT 1 +#endif + #ifdef SFCB_IX86 #define SFCB_ASM(x) asm(x) #else Index: msgqueue.c =================================================================== RCS file: /cvsroot/sblim/sfcb/msgqueue.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- msgqueue.c 7 Jul 2005 13:06:31 -0000 1.8 +++ msgqueue.c 27 Jul 2005 16:22:40 -0000 1.9 @@ -254,12 +254,12 @@ _SFCB_TRACE(1, ("--- Received data segment %d bytes", *length)); } - if (spMsg.type.type == MSG_DATA) { + if (spMsg.type == MSG_DATA) { _SFCB_TRACE(1, ("--- Received %d bytes", *length)); _SFCB_RETURN(0); } - if (spMsg.type.ctl.xtra == MSG_X_EXTENDED_CTL_MSG) { + if (spMsg.xtra == MSG_X_EXTENDED_CTL_MSG) { *data = malloc(256); *length = 256; do { @@ -269,22 +269,22 @@ } while (mqg->teintr) ; } - switch (spMsg.type.ctl.xtra) { + switch (spMsg.xtra) { case MSG_X_PROVIDER: *length = spMsg.segments; *data = spMsg.provId; case MSG_X_INVALID_NAMESPACE: case MSG_X_PROVIDER_NOT_FOUND: case MSG_X_INVALID_CLASS: - _SFCB_RETURN(spMsg.type.ctl.xtra); + _SFCB_RETURN(spMsg.xtra); default: *data = NULL; - mlogf(M_ERROR,M_SHOW,"### %d ??? %ld-%d\n", currentProc, spMsg.type.type, - spMsg.type.ctl.xtra); + mlogf(M_ERROR,M_SHOW,"### %d ??? %ld-%d\n", currentProc, spMsg.type, + spMsg.xtra); abort(); } - _SFCB_RETURN(spMsg.type.ctl.xtra); + _SFCB_RETURN(spMsg.xtra); } int spRecvReq(int *s, int *from, void **data, unsigned long *length, MqgStat *mqg) @@ -317,8 +317,8 @@ static int spSendMsg(int *to, int *from, int n, struct iovec *iov, int size) { - SpMessageHdr spMsg = { {MSG_DATA}, *from, size }; - spMsg.type.ctl.type = MSG_DATA; + SpMessageHdr spMsg = { 0, 0, *from, size }; + spMsg.type = MSG_DATA; static char *em = "spSendMsg sending to"; struct msghdr msg; ssize_t rc; @@ -427,7 +427,7 @@ static int spSendCtl(int *to, int *from, short code, unsigned long count, void *data) { - SpMessageHdr spMsg = { {MSG_DATA}, *from, 0 }; + SpMessageHdr spMsg = { 0, 0, *from, 0 }; static char *em = "spSendCtl sending to"; struct msghdr msg; struct iovec iov[2]; @@ -456,8 +456,8 @@ msg.msg_iov = iov; msg.msg_iovlen = 1; - spMsg.type.ctl.type = MSG_CTL; - spMsg.type.ctl.xtra = code; + spMsg.type = MSG_CTL; + spMsg.xtra = code; spMsg.segments = count; spMsg.provId = data; |