mirror of
https://github.com/stargieg/bacnet-stack
synced 2025-10-19 23:25:23 +08:00
[r3157] Merged revision(s) 3154 from branches/releases/bacnet-stack-0-8-0:
Fixed WriteProperty demo command line options when using more than one property value and a context tag. Thank you James Gordon for reporting the problem. ........
This commit is contained in:
parent
91abf20d1b
commit
2cc4670f09
|
|
@ -297,8 +297,9 @@ int main(
|
|||
return 1;
|
||||
}
|
||||
args_remaining = (argc - 7);
|
||||
/* location of next arg in arg array */
|
||||
tag_value_arg = 7;
|
||||
for (i = 0; i < MAX_PROPERTY_VALUES; i++) {
|
||||
tag_value_arg = 7 + (i * 2);
|
||||
/* special case for context tagged values */
|
||||
if (toupper(argv[tag_value_arg][0]) == 'C') {
|
||||
context_tag = (uint8_t) strtol(&argv[tag_value_arg][1], NULL, 0);
|
||||
|
|
@ -310,12 +311,14 @@ int main(
|
|||
Target_Object_Property_Value[i].context_specific = false;
|
||||
}
|
||||
property_tag = strtol(argv[tag_value_arg], NULL, 0);
|
||||
tag_value_arg++;
|
||||
args_remaining--;
|
||||
if (args_remaining <= 0) {
|
||||
fprintf(stderr, "Error: not enough tag-value pairs\n");
|
||||
return 1;
|
||||
}
|
||||
value_string = argv[tag_value_arg + 1];
|
||||
value_string = argv[tag_value_arg];
|
||||
tag_value_arg++;
|
||||
args_remaining--;
|
||||
/* printf("tag[%d]=%u value[%d]=%s\n",
|
||||
i, property_tag, i, value_string); */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user