Commit df048cb3 authored by Andrea Zoli's avatar Andrea Zoli Committed by Camera Server Generic User
Browse files

Fix the Tail section parsing while using .stream configuration files.

parent 0fee3ec3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@ char* ConfigurationFile::getLine() throw(PacketExceptionIO*)
    try
    try
    {
    {
        temp = InputTextFile::getLine();
        temp = InputTextFile::getLine();
        if(temp[0] == 0)
        if(temp == 0 || temp[0] == 0)
        	return temp;
        	return temp;
        while(strstr(temp, "--") !=  NULL)
        while(strstr(temp, "--") !=  NULL)
        {
        {
+1 −1
Original line number Original line Diff line number Diff line
@@ -254,7 +254,7 @@ bool Packet::createPacketType(char* fileName, bool isprefix, word dimprefix) thr
												{
												{
													dimPacketTail = dataField->getPacketTail()->size();
													dimPacketTail = dataField->getPacketTail()->size();
													line = file.getLastLineRead();
													line = file.getLastLineRead();
													if(strcmp(line, "[Compression]") == 0) {
													if(line && strcmp(line, "[Compression]") == 0) {
														compressible = true;
														compressible = true;
														compressionAlgorithmsIndex = atoi(file.getLine());
														compressionAlgorithmsIndex = atoi(file.getLine());
														compressionAlgorithmsSection = atoi(file.getLine());
														compressionAlgorithmsSection = atoi(file.getLine());
+2 −2
Original line number Original line Diff line number Diff line
@@ -247,7 +247,7 @@ bool PartOfPacket::loadFields(InputText& fp) throw(PacketException*)
    do {
    do {
        name = fp.getLine();
        name = fp.getLine();
        count++;
        count++;
        if(name[0] == '[')
        if(fp.isEOF() || name[0] == '[')
        {
        {
            count--;
            count--;
            break;
            break;
@@ -273,7 +273,7 @@ bool PartOfPacket::loadFields(InputText& fp) throw(PacketException*)
        numberOfFields++;
        numberOfFields++;
        name = fp.getLine();
        name = fp.getLine();
        /// It reads until the buffer ends
        /// It reads until the buffer ends
        if(name[0] == '[')
        if(fp.isEOF() || name[0] == '[')
        {
        {
            break;
            break;
        }
        }