Commit abadba95 authored by Claes Sjofors's avatar Claes Sjofors

Profinet rt bugfixes

parent 2cf07ece
......@@ -293,6 +293,8 @@ static pwr_tStatus IoAgentInit (
local->device_data[ii]->iocr_data[jj]->clean_io_data = (unsigned char *) calloc(1, offset_inputs + offset_outputs);
local->device_data[ii]->iocr_data[jj]->clean_io_data_length = offset_inputs + offset_outputs;
}
} else {
errh_Error( "Download of Profinet Device configuration failed for: %s", device_vect[ii]->device_name);
}
}
}
......
......@@ -246,7 +246,8 @@ static pwr_tStatus IoRackRead (
}
if (sp->ErrorCount > sp->ErrorSoftLimit ) {
memset(((io_sPnRackLocal *)(rp->Local))->inputs, 0, ((io_sPnRackLocal *)(rp->Local))->bytes_of_input);
if ( ((io_sPnRackLocal *)(rp->Local))->bytes_of_input > 0)
memset(((io_sPnRackLocal *)(rp->Local))->inputs, 0, ((io_sPnRackLocal *)(rp->Local))->bytes_of_input);
}
// if (sp->ErrorCount > sp->ErrorHardLimit && sp->StallAction >= pwr_ePbStallAction_EmergencyBreak) {
......
......@@ -57,7 +57,7 @@ typedef struct _PN_Alarm_Data {
class PnIOCRData {
public:
PnIOCRData() : type(0), number_modules(0), identifier(0), io_data_length(0) {}
PnIOCRData() : type(0), number_modules(0), identifier(0), io_data_length(0), clean_io_data_length(0) {}
unsigned short type;
unsigned short number_modules;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment