RE: query to dsx1Intervaltable always kills the subagent
Malathi Panyam <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
OK:-) Here is the code
dsx1IntervalTable_data ds1ItTableData [256][2048];
//function below gets called from dsx1Intervatable_container_load()
UINT32 dsx1IntervalTable_Extract_IEfromMOContainer(MOContainer *moContainer, netsnmp_container *snmpContainer)
{
dsx1IntervalTable_rowreq_ctx *rowreq_ctx;
ManagedObject *moObject = moContainer->head();
long dsx1IntervalIndex, dsx1IntervalNumber;
long lMaxIndex = 0;
while (false == moContainer->atEnd(moObject)) {
//Two dimensional array gets filled in here
moObject = moObject->pNext;
}
for (int dsx1Index = 1, dsx1IntIndex = 1; dsx1Index <= lMaxIndex, dsx1IntIndex <= 96; dsx1Index++, dsx1IntIndex++){
rowreq_ctx = dsx1IntervalTable_allocate_rowreq_ctx(NULL);
if (NULL == rowreq_ctx) {
log(pSNMPLogger, "memory allocation failed\n");
return MFD_RESOURCE_UNAVAILABLE;
}
if(MFD_SUCCESS != dsx1IntervalTable_indexes_set(rowreq_ctx
, dsx1Index
, dsx1IntIndex
)) {
log(pSNMPLogger,"error setting index while loading "
"dsx1IntervalTable data.");
dsx1IntervalTable_release_rowreq_ctx(rowreq_ctx);
continue;
}
CONTAINER_INSERT(snmpContainer, rowreq_ctx);
}
return MFD_SUCCESS;
}
//function below gets called form dsx1IntervalTable_row_prep()
int dsx1IntervalTable_Extract_Row(dsx1IntervalTable_rowreq_ctx *rowreq_ctx)
{
long ds1Index = rowreq_ctx->tbl_idx.dsx1IntervalIndex - 1;
long ds1IntIndex = rowreq_ctx->tbl_idx.dsx1IntervalNumber -1;
rowreq_ctx->data.dsx1IntervalESs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalESs;
rowreq_ctx->data.dsx1IntervalSESs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalSESs;
rowreq_ctx->data.dsx1IntervalSEFSs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalSEFSs;
rowreq_ctx->data.dsx1IntervalUASs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalUASs;
rowreq_ctx->data.dsx1IntervalCSSs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalCSSs;
rowreq_ctx->data.dsx1IntervalPCVs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalPCVs;
rowreq_ctx->data.dsx1IntervalLESs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalLESs;
rowreq_ctx->data.dsx1IntervalBESs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalBESs;
rowreq_ctx->data.dsx1IntervalDMs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalDMs;
rowreq_ctx->data.dsx1IntervalLCVs = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalLCVs;
rowreq_ctx->data.dsx1IntervalValidData = ds1ItTableData[ds1Index] [ds1IntIndex].dsx1IntervalValidData;
return MFD_SUCCESS;
}
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: Monday, March 28, 2011 9:59 AM
To: Malathi Panyam
Cc: [email protected]
Subject: Re: query to dsx1Intervaltable always kills the subagent
On 28 March 2011 17:56, Malathi Panyam <[email protected]> wrote:
> Just to make it clear
> I am inserting the row into the container at the end of the for loop below.
> And the complete back trace from the core file
is no use to anyone who doesn't have the code :-)
Dave
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and publish
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users