Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file parser issue when goose have no PA #488

Open
Ptlia opened this issue Dec 18, 2023 · 0 comments
Open

Config file parser issue when goose have no PA #488

Ptlia opened this issue Dec 18, 2023 · 0 comments

Comments

@Ptlia
Copy link

Ptlia commented Dec 18, 2023

In my configuration file scd, some GC have not PA and not { is added in file. I need to change the hardcoded indendation = 4 to include a verification to make sur the line ending with {

else if (StringUtils_startsWith((char*) lineBuffer, "GC")) {
uint32_t confRef;
int fixedOffs;
int minTime = -1;
int maxTime = -1;

                    int matchedItems = sscanf((char*) lineBuffer, "GC(%s %s %s %u %i %i %i)",
                            nameString, nameString2, nameString3, &confRef, &fixedOffs, &minTime, &maxTime);

                    if (matchedItems < 5) goto exit_error;

                    currentGoCB = GSEControlBlock_create(nameString, currentLN, nameString2,
                            nameString3, confRef, fixedOffs, minTime, maxTime);

                    if (StringUtils_endsWith((char*)lineBuffer, "{")) {
                        indendation = 4;
                    }

                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant