You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2004/10/15 16:50:04 UTC
cvs commit: ws-axis/c/src/engine/client Call.cpp
whitlock 2004/10/15 07:50:04
Modified: c/src/engine/client Call.cpp
Log:
Change HandlerPropertyData into a class
Revision Changes Path
1.61 +10 -11 ws-axis/c/src/engine/client/Call.cpp
Index: Call.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/client/Call.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- Call.cpp 24 Sep 2004 05:29:32 -0000 1.60
+++ Call.cpp 15 Oct 2004 14:50:04 -0000 1.61
@@ -119,12 +119,16 @@
return m_nStatus;
}
-typedef struct
+class HandlerProperty
{
+public:
+ HandlerProperty(AxisChar *n, void *v, int l) {name=n; value=v; len=l;}
+
+ // The storage pointed at by name and value is not owned by HandlerProperty
AxisChar *name;
void *value;
int len;
-} HandlerPropertyData;
+};
int Call::initialize (PROVIDERTYPE nStyle, int secure)
/* Does this mean that the stub that uses this Call object as well as all
@@ -157,9 +161,9 @@
list<void*>::iterator it = m_handlerProperties.begin();
while (it != m_handlerProperties.end())
{
- HandlerPropertyData *pHpi = (HandlerPropertyData*)(*it);
- m_pMsgData->setProperty(pHpi->name, pHpi->value, pHpi->len);
- free(pHpi);
+ HandlerProperty *pHp = (HandlerProperty*)(*it);
+ m_pMsgData->setProperty(pHp->name, pHp->value, pHp->len);
+ delete pHp;
it++;
}
m_handlerProperties.clear();
@@ -261,12 +265,7 @@
// in the Call object since the m_pMsgData is not set up
// until Call::initialize which doesn't happen until the actual
// web service is invoked.
- HandlerPropertyData* pHpi =
- (HandlerPropertyData*) malloc(sizeof(HandlerPropertyData));
- pHpi->name = name;
- pHpi->value = value;
- pHpi->len = len;
- m_handlerProperties.push_back(pHpi);
+ m_handlerProperties.push_back(new HandlerProperty(name,value,len));
return AXIS_SUCCESS;
}