T_exeCode C_InsertInMapAction::execute(T_pCmd_scenario P_pCmd, T_pCallContext P_callCtxt, C_MessageFrame *P_msg, C_MessageFrame *P_ref) { T_exeCode L_exeCode = E_EXE_NOERROR ; T_ValueData L_val ; T_pValueData L_value_id = NULL ; C_CallContext::T_pCallMap *L_map = P_callCtxt->m_call_control->get_call_map(); L_val.m_type = E_TYPE_NUMBER ; if (P_msg -> get_field_value(m_id, m_instance_id, m_sub_id, &L_val) == true) { pair_t<C_CallContext::T_CallMap::iterator,bool> L_pr ; C_CallContext::T_contextMapData L_data ; L_value_id = &L_val ; L_value_id = P_callCtxt->set_id (m_position, L_value_id); L_pr = L_map[m_position] ->insert(C_CallContext::T_CallMap::value_type(*L_value_id, P_callCtxt)); if(P_callCtxt->m_channel_id_verdict_to_do == false) { P_callCtxt->m_channel_id_verdict_to_do = true ; P_callCtxt->m_channel_id_verdict = m_position ; } L_data.m_channel = m_position ; L_data.m_iterator = L_pr.first ; (P_callCtxt->m_map_data_list)->push_back(L_data); resetMemory(L_val); } else { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": the value of the field asked is incorrect or not found"); L_exeCode = E_EXE_ERROR; } return (L_exeCode); }
PicturesContainer::~PicturesContainer() { resetMemory(); PRINT_CONSTR (1, "Destruction d'un PicturesContainer"); }
void DbPdiskInfo::getResult(SQLHSTMT sqlStmt,void** holder) { SQLRETURN ret; *holder = new vector<tlgpfs_pdisk_info_t*>; vector<tlgpfs_pdisk_info_t*>* status = (vector<tlgpfs_pdisk_info_t*>*)* holder; tlgpfs_pdisk_info_t* tmp = allocateMemory(); SQLLEN clusterIdLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 1, SQL_C_CHAR, tmp->cluster_id, CLUSTER_ID_SIZE, &clusterIdLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 1 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN rgNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 2, SQL_C_CHAR, tmp->rg_name, RG_NAME_SIZE, &rgNameLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 2 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN daNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 3, SQL_C_CHAR, tmp->da_name, DA_NAME_SIZE, &daNameLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 3 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 4, SQL_C_CHAR, tmp->pdisk_name, PDISK_NAME_SIZE, &pdiskNameLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 4 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskDevPathLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 5, SQL_C_CHAR, tmp->pdisk_dev_path, PDISK_DEV_PATH_SIZE, &pdiskDevPathLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 5 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskStateLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 6, SQL_C_CHAR, tmp->pdisk_state, PDISK_STATE_SIZE, &pdiskStateLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 6 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskFruLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 7, SQL_C_CHAR, tmp->pdisk_fru, PDISK_FRU_SIZE, &pdiskFruLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 7 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskLocationLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 8, SQL_C_CHAR, tmp->pdisk_location, PDISK_LOCATION_SIZE, &pdiskLocationLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 8 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskReplPriorLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 9, SQL_C_SLONG, tmp->pdisk_repl_prior, 0, &pdiskReplPriorLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 9 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN pdiskFreeSpaceLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 10, SQL_C_UBIGINT, tmp->pdisk_free_space, 0, &pdiskFreeSpaceLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 10 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN changeLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 11, SQL_C_SLONG, tmp->change, 0, &changeLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 11 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN healthLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 12, SQL_C_SLONG, tmp->health, 0, &healthLen); DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLBindCol 12 STMT",ret,sqlStmt,SQL_HANDLE_STMT); ret = DbInterface::dbModule.SQLFetch(sqlStmt); if(ret != SQL_NO_DATA)//don't roll back even if empty row. DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLFetch",ret,sqlStmt,SQL_HANDLE_STMT); while((ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)) { tlgpfs_pdisk_info_t* temp = allocateMemory(); copyInfo(temp,tmp); status->push_back(temp); resetMemory(tmp); ret = DbInterface::dbModule.SQLFetch(sqlStmt); if(ret != SQL_NO_DATA)//don't roll back even if empty row. DbInterface::checkSqlRetcode("DbPdiskInfo::getResult SQLFetch",ret,sqlStmt,SQL_HANDLE_STMT); } }
T_exeCode C_SetValueActionMethodExtern::execute(T_pCmd_scenario P_pCmd, T_pCallContext P_callCtxt, C_MessageFrame *P_msg, C_MessageFrame *P_ref) { T_exeCode L_exeCode = E_EXE_NOERROR ; int L_ret = 0 ; T_ValueData L_mem ; T_ValueData L_result ; T_ValueData L_value ; bool L_reset_value = false ; if (m_string_expr != NULL) { L_mem = search_memory(P_callCtxt, P_msg, L_reset_value) ; } else { L_mem.m_type = E_TYPE_STRING ; L_mem.m_value.m_val_binary.m_size = 0 ; L_mem.m_value.m_val_binary.m_value = NULL ; } L_value.m_type = E_TYPE_NUMBER ; L_result.m_type = E_TYPE_NUMBER ; if (P_msg->get_buffer(&L_value,m_msg_part_type) == -1) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": error in body of message"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; resetMemory(L_value); return (L_exeCode); } else { L_ret = (*m_external_method)(&L_value, &L_mem, &L_result); if (L_ret != -1) { if (P_msg->set_field_value(&L_result, m_id, m_occurence, m_instance_id, m_sub_id) == false ) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": problem when set field value"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; } } else { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": problem when using external method (md5 or AKA)"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; } resetMemory(L_result); resetMemory(L_value); // Temporary fixed, commented the below line. search_memory method doesnt allocate using malloc, hence free dumps // to be fixed //resetMemory(L_mem); } if (L_reset_value == true) { L_mem.m_type = E_TYPE_NUMBER ; } return (L_exeCode); }
FTTdriverNode::FTTdriverNode(FGLnode *aSupervisor,FTTpres *aTTpres, FGLink *aGLink,FpTree *apTree) :FGLwalkNode(aSupervisor,apTree){ itsInputTTpres=aTTpres; itsGLink=aGLink; pTree=apTree; factorRank=-1; groupOrder=-1; newGen=itsInputTTpres->g->numItems; root=pTree->bv; displayParentSerial=-1; displaySerial=-1; displayPres=0; displayType=-1; // create the driver GLink itsGLink=new FGLink; #ifdef Frank_MemoryDebugging extern FGLink *pLibLink; pLibLink=itsGLink; #endif // create pLib FGLvarInitInfo *info= new FpLibInitInfo; pLib= new FpLib(itsGLink,(FpLibInitInfo*)info); delete info;info=0; // set up root for pLib pLib->j=0; pLib->I(); pLib->e=1; pLib->V(); pLib->root=pLib->cv; // set up the free presentation root for pLib pLib->j=1; pLib->I(); pLib->e=1; pLib->V(); pLib->freeRoot=pLib->cv; // add itsInputTTpres to the library foundLinkList=FALSE; noFirstCoord=TRUE; noSecondCoord=TRUE; noThirdCoord=TRUE; genIndex=1; relIndex=1; if(itsInputTTpres->g->numItems==0){ // the presentation is trivial. This case is detected // externally and signalled by setting the hook to NA hook=FGLink::NA; } else hook=pLib->root; newPres=itsInputTTpres; // classify the input presentation classify(); // zero the nodes and working objects TT1=ZERO; TT1p=ZERO; TT2=ZERO; TT2p=ZERO; Lib=ZERO; currentPres=ZERO; newPres=ZERO; #ifdef Frank_MemoryDebugging tout <= "GLink blocksize for pTree and pLib is "; v->itsGLink->itsBlockManager->repBlockSize(tout) <= "\n"; #endif send(forgetPresMsg); itsInputTTpres=ZERO; #ifdef Frank_MemoryDebugging resetMemory(); memout <= "Total available memory "; repMemSize(memout,totalMemory) <= "\n"; #endif // control func=driverFunc; mailPerson=walkMail; }
T_exeCode C_ReStoreAction::execute(T_pCmd_scenario P_pCmd, T_pCallContext P_callCtxt, C_MessageFrame *P_msg, C_MessageFrame *P_ref) { T_exeCode L_exeCode = E_EXE_NOERROR ; T_pValueData L_mem ; int L_size ; GEN_DEBUG(2, "restore memory id = " << m_mem_id); GEN_DEBUG(2, "restore field id = " << m_id); L_mem = P_callCtxt->get_memory(m_mem_id); L_size = m_size ; if (L_size != -1) { T_ValueData L_val ; L_val.m_type = E_TYPE_NUMBER ; if (L_mem->m_value.m_val_binary.m_size == 0) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << " memory zone that was not previously stored"); return (L_exeCode); } // RETRIEVE the data if (P_msg -> get_field_value(m_id, m_occurence, m_instance_id, m_sub_id, &L_val) == true) { if (L_size > (int)L_val.m_value.m_val_binary.m_size) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": the size desired [" << L_size << "] exceed the length of buffer [" << L_val.m_value.m_val_binary.m_size << "]"); L_size = L_val.m_value.m_val_binary.m_size ; } copyBinaryVal(L_val, m_begin, L_size, *L_mem); if (P_msg -> set_field_value(&L_val, m_id, m_occurence, m_instance_id, m_sub_id) == false ) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": problem when set field value"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; } resetMemory(L_val); } else { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": the value of the field asked is incorrect or not found"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; } } else { if (P_msg -> set_field_value(L_mem, m_id, m_occurence, m_instance_id, m_sub_id) == false ) { GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, action_name_table[m_type] << ": problem when set field value"); GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "error on call with session-id [" << P_callCtxt->m_id_table[P_pCmd->m_channel_id] << "]"); L_exeCode = E_EXE_ERROR; } } return (L_exeCode); }
/* * Constructs a ResampleForm as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ ResampleForm::ResampleForm( RasterInfo input, RasterInfo output, QWidget* parent, bool modal, Qt::WFlags fl ) : QDialog( parent, fl ) { setModal( modal ); //Keeps it from overly expanding since over riding sizeHint didn't work setMaximumSize( 152, 150 ); if ( objectName().isEmpty() ) setObjectName( "ResampleForm" ); setPalette( RESAMPLEFORM_COLOR ); bytesPerRow = (input.cols() * (input.bitCount() / 8)); ResampleFormLayout = new QVBoxLayout( this ); ResampleFormLayout->setSpacing( 6 ); inputLayout = new QVBoxLayout( 0 ); inputLayout->setSpacing( 6 ); resampleBox = new QGroupBox( this ); resampleBoxLayout = new QVBoxLayout( resampleBox ); resampleBoxLayout->setSpacing( 6 ); resampleBoxLayout->setMargin( 11 ); resampleBoxLayout->setAlignment( Qt::AlignTop ); resampleCombo = new QComboBox( resampleBox ); resampleCombo->setMinimumSize( QSize( 125, 0 ) ); resampleCombo->installEventFilter( this ); resampleBoxLayout->addWidget( resampleCombo ); categoricalLayout = new QHBoxLayout( 0 ); categoricalLayout->setParent( resampleBoxLayout ); resampleBoxLayout->addLayout( categoricalLayout ); catconLabel = new QLabel( "", resampleBox ); conRadio = new QRadioButton( "Continuous Data", resampleBox ); catRadio = new QRadioButton( "Categorical Data", resampleBox ); catconButtonGroup = new QGroupBox( resampleBox ); catconButtonGroup->hide(); QHBoxLayout *catconLayout = new QHBoxLayout( catconButtonGroup ); catconLayout->addWidget( catRadio ); catconLayout->addWidget( conRadio ); categoricalLayout->addWidget( catconLabel ); categoricalLayout->addWidget( conRadio ); categoricalLayout->addWidget( catRadio ); inputLayout->addWidget( resampleBox ); ignoreBox = new QGroupBox( this ); ignoreBoxLayout = new QHBoxLayout( ignoreBox ); ignoreBoxLayout->setSpacing( 6 ); ignoreBoxLayout->setMargin( 11 ); ignoreBoxLayout->setAlignment( Qt::AlignTop ); ignoreLayout = new QVBoxLayout( 0 ); ignoreLayout->setSpacing( 6 ); ignoreLabel = new QLabel( "Ignore values cannot be used if an output \"No Data \nValue\" is not provided.", ignoreBox ); ignoreLabel->hide(); ignoreBoxLayout->addWidget( ignoreLabel ); ignoreEdit = new QLineEdit( ignoreBox ); ignoreEdit->setMinimumSize( QSize( 125, 0 ) ); ignoreEdit->setValidator( new MapimgValidator( output.fullDataType(), ignoreEdit ) ); ignoreLayout->addWidget( ignoreEdit ); newButton = new QPushButton( ignoreBox ); newButton->setAutoDefault( false ); ignoreLayout->addWidget( newButton ); delButton = new QPushButton( ignoreBox ); delButton->setEnabled( false ); delButton->setAutoDefault( false ); ignoreLayout->addWidget( delButton ); ingoreSpacer = new QSpacerItem( 31, 91, QSizePolicy::Minimum, QSizePolicy::Expanding ); ignoreLayout->addItem( ingoreSpacer ); ignoreBoxLayout->addLayout( ignoreLayout ); ignoreListBox = new QListWidget( ignoreBox ); ignoreListBox->setMinimumSize( QSize( 125, 0 ) ); ignoreListBox->installEventFilter( this ); ignoreBoxLayout->addWidget( ignoreListBox ); inputLayout->addWidget( ignoreBox ); if( !output.hasNoDataValue() ) { ignoreLabel->show(); ignoreEdit->hide(); newButton->hide(); delButton->hide(); ignoreListBox->hide(); } ResampleFormLayout->addLayout( inputLayout ); memoryBox = new QGroupBox( this ); memoryBoxLayout = new QVBoxLayout( memoryBox ); memoryBoxLayout->setSpacing( 6 ); memoryBoxLayout->setMargin( 11 ); memoryBoxLayout->setAlignment( Qt::AlignHCenter | Qt::AlignTop ); memoryLabelResetLayout = new QHBoxLayout(); memoryLabel = new QLabel( memoryBox ); memoryLabel->setAlignment( Qt::AlignCenter ); memoryResetButton = new QPushButton( "Default", memoryBox ); QFontMetrics metrics( memoryResetButton->font() ); memoryResetButton->setMaximumWidth( metrics.width(memoryResetButton->text()) + (metrics.maxWidth()) ); memoryResetButton->setMaximumHeight( (int)(1.5*metrics.height()) ); memoryResetButton->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ) ); //DEFAULT_Max_Data_Element_Count is defined in imgio.h //minimum computed as the ratio of output to input plus 2% of the input memoryAllocation = new QSlider( Qt::Horizontal, memoryBox ); memoryAllocation->setMinimum( (int)((output.pixelSize()/input.pixelSize()) + 0.02*(float)input.rows()) ); memoryAllocation->setMaximum( input.rows() ); memoryAllocation->setPageStep( 10 ); memoryAllocation->setValue( DEFAULT_Max_Data_Element_Count ); defaultMemory = memoryAllocation->value(); memoryLabelResetLayout->addWidget( memoryLabel ); memoryLabelResetLayout->addWidget( memoryResetButton ); memoryBoxLayout->addLayout( memoryLabelResetLayout ); memoryBoxLayout->addWidget( memoryAllocation ); inputLayout->addWidget( memoryBox ); okLayout = new QHBoxLayout( 0 ); okLayout->setSpacing( 6 ); okSpacer = new QSpacerItem( 141, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); okLayout->addItem( okSpacer ); okButton = new QPushButton( this ); okButton->setAutoDefault( false ); okLayout->addWidget( okButton ); cancelButton = new QPushButton( this ); cancelButton->setAutoDefault( false ); cancelButton->setShortcut( Qt::Key_Escape ); okLayout->addWidget( cancelButton ); ResampleFormLayout->addLayout( okLayout ); languageChange(); resize( QSize(300, 218).expandedTo(minimumSizeHint()) ); // clearWState( WState_Polished ); connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( resampleCombo, SIGNAL( activated(const QString&) ), this, SLOT( rcodeChanged(const QString&) ) ); connect( ignoreEdit, SIGNAL( returnPressed() ), this, SLOT( newVal() ) ); connect( ignoreEdit, SIGNAL( returnPressed() ), newButton, SLOT( animateClick() ) ); connect( newButton, SIGNAL( clicked() ), this, SLOT( newVal() ) ); connect( delButton, SIGNAL( clicked() ), this, SLOT( delVal() ) ); connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( memoryAllocation, SIGNAL( valueChanged( int ) ), this, SLOT( updateMemoryAllocation() ) ); connect( memoryResetButton, SIGNAL( clicked() ), this, SLOT( resetMemory() ) ); canceled = false; ilist.clear(); rcodeChanged( resampleCombo->currentText() ); }
void DbDiskInfo::getResult(SQLHSTMT sqlStmt,void** holder) { SQLRETURN ret; *holder = new vector<tlgpfs_disk_info_t*>; vector<tlgpfs_disk_info_t*>* status = (vector<tlgpfs_disk_info_t*>*)* holder; tlgpfs_disk_info_t* tmp = allocateMemory(); SQLLEN clusterIdLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 1, SQL_C_CHAR, tmp->cluster_id, CLUSTER_ID_SIZE, &clusterIdLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 1 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN diskNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 2, SQL_C_CHAR, tmp->disk_name, DISK_NAME_SIZE, &diskNameLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 2 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN nodeNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 3, SQL_C_CHAR, tmp->node_name, NODE_NAME_SIZE, &nodeNameLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 3 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN statusLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 4, SQL_C_CHAR, tmp->status, STATUS_SIZE, &statusLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 4 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN availabilityLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 5, SQL_C_CHAR, tmp->availability, AVAILABILITY_SIZE, &availabilityLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 5 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN poolNameLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 6, SQL_C_CHAR, tmp->pool_name, POOL_NAME_SIZE, &poolNameLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 6 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN volIdLen = SQL_NTS; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 7, SQL_C_CHAR, tmp->vol_id, VOL_ID_SIZE, &volIdLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 7 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN metaDataLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 8, SQL_C_CHAR, tmp->meta_data, META_DATA_SIZE, &metaDataLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 8 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN dataLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 9, SQL_C_CHAR, tmp->data, DATA_SIZE, &dataLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 9 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN diskWaitLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 10, SQL_C_CHAR, tmp->disk_wait, DISK_WAIT_SIZE, &diskWaitLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 10 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN totalSpaceLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 11, SQL_C_UBIGINT, tmp->total_space, 0, &totalSpaceLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 11 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN fullBlkSpaceLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 12, SQL_C_UBIGINT, tmp->full_blk_space, 0, &fullBlkSpaceLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 12 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN subBlkSpaceLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 13, SQL_C_UBIGINT, tmp->sub_blk_space, 0, &subBlkSpaceLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 13 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN failGroupIdLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 14, SQL_C_SLONG, tmp->fail_group_id, 0, &failGroupIdLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 14 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN isFreeLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 15, SQL_C_SLONG, tmp->is_free, 0, &isFreeLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 15 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN changeLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 16, SQL_C_SLONG, tmp->change, 0, &changeLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 16 STMT",ret,sqlStmt,SQL_HANDLE_STMT); SQLLEN healthLen = 0; ret = DbInterface::dbModule.SQLBindCol(sqlStmt, 17, SQL_C_SLONG, tmp->health, 0, &healthLen); DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLBindCol 17 STMT",ret,sqlStmt,SQL_HANDLE_STMT); ret = DbInterface::dbModule.SQLFetch(sqlStmt); if(ret != SQL_NO_DATA)//don't roll back even if empty row. DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLFetch",ret,sqlStmt,SQL_HANDLE_STMT); while((ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)) { tlgpfs_disk_info_t* temp = allocateMemory(); copyInfo(temp,tmp); status->push_back(temp); resetMemory(tmp); ret = DbInterface::dbModule.SQLFetch(sqlStmt); if(ret != SQL_NO_DATA)//don't roll back even if empty row. DbInterface::checkSqlRetcode("DbDiskInfo::getResult SQLFetch",ret,sqlStmt,SQL_HANDLE_STMT); } }