|
@@ -55,6 +55,13 @@ OUT:
|
55
|
55
|
return privsec;
|
56
|
56
|
}
|
57
|
57
|
|
|
58
|
+int ts_privsec_is_same(struct ts_privsec *p1, struct ts_privsec *p2) {
|
|
59
|
+ if (p1 == p2) return 1; // Same
|
|
60
|
+ if ((!p1 && p2) || (p1 && !p2)) return 0; // Not same (one is NULL)
|
|
61
|
+ if (p1->section_header->section_length != p1->section_header->section_length) return 0; // Not same
|
|
62
|
+ return memcmp(p1->section_header->section_data, p2->section_header->section_data, p1->section_header->section_length) == 0;
|
|
63
|
+}
|
|
64
|
+
|
58
|
65
|
void ts_privsec_dump(struct ts_privsec *privsec) {
|
59
|
66
|
struct ts_section_header *sec = privsec->section_header;
|
60
|
67
|
ts_section_dump(sec);
|