Skip to content

Commit

Permalink
fixed smpCnt value
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenblair committed May 23, 2012
1 parent aa954a5 commit bd240e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions c/src/svDecodePacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ void svDecodeASDU(unsigned char *buf, int len, int noASDU) {
int offsetForNonSequence;
unsigned char *svID = NULL;
int svIDLength = 0;
CTYPE_INT16U smpCnt = 0;

int i = 0;
for (i = 0; i < len;) {
CTYPE_INT16U smpCnt = 0;
for (i = 0; i < len;) {
tag = (unsigned char) buf[i];
lengthFieldSize = getLengthFieldSize((unsigned char) buf[i + 1]);
lengthValue = decodeLength((unsigned char *) &buf[i + 1]);
Expand All @@ -54,7 +54,7 @@ void svDecodeASDU(unsigned char *buf, int len, int noASDU) {

break;
case SV_TAG_SMPCNT:
BER_DECODE_CTYPE_INT16U(&buf[i + 1 + lengthFieldSize], &smpCnt);
ber_decode_integer(&buf[i + 1], lengthValue, &smpCnt, SV_GET_LENGTH_INT16U);
break;
case SV_TAG_CONFREV:

Expand Down

0 comments on commit bd240e3

Please sign in to comment.