summaryrefslogtreecommitdiffstats
path: root/asn1c-fixup.patch
blob: 1b290769d9421c33816c78d9437ba787be3bb1e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
This patch needs to be applied to the asn1c output in order to
make sure we don't re-define the 'user_information' for every different
Dialogue portion PDU type and to make the EXTERNAL magic work
diff -Nru /usr/local/include/osmocom/tcap//AARE-apdu.h ./AARE-apdu.h
--- /usr/local/include/osmocom/tcap//AARE-apdu.h	2010-07-16 12:50:01.000000000 +0200
+++ ./AARE-apdu.h	2010-07-09 15:40:49.000000000 +0200
@@ -15,7 +15,7 @@
 #include <OBJECT_IDENTIFIER.h>
 #include "Associate-result.h"
 #include "Associate-source-diagnostic.h"
-#include "EXTERNAL.h"
+#include <EXTERNAL.h>
 #include <asn_SEQUENCE_OF.h>
 #include <constr_SEQUENCE_OF.h>
 #include <constr_SEQUENCE.h>
@@ -35,17 +35,12 @@
 	OBJECT_IDENTIFIER_t	 application_context_name;
 	Associate_result_t	 result;
 	Associate_source_diagnostic_t	 result_source_diagnostic;
-#if 0
 	struct AARE_user_information {
 		A_SEQUENCE_OF(EXTERNAL_t) list;
 		
 		/* Context for parsing across buffer boundaries */
 		asn_struct_ctx_t _asn_ctx;
 	} *user_information;
-#else
-	/* use the definition from ABRT-apdu.h */
-	struct user_information *user_information;
-#endif
 	
 	/* Context for parsing across buffer boundaries */
 	asn_struct_ctx_t _asn_ctx;
diff -Nru /usr/local/include/osmocom/tcap//AARQ-apdu.h ./AARQ-apdu.h
--- /usr/local/include/osmocom/tcap//AARQ-apdu.h	2010-07-16 12:50:00.000000000 +0200
+++ ./AARQ-apdu.h	2010-07-09 15:40:49.000000000 +0200
@@ -13,7 +13,7 @@
 /* Including external dependencies */
 #include <BIT_STRING.h>
 #include <OBJECT_IDENTIFIER.h>
-#include "EXTERNAL.h"
+#include <EXTERNAL.h>
 #include <asn_SEQUENCE_OF.h>
 #include <constr_SEQUENCE_OF.h>
 #include <constr_SEQUENCE.h>
@@ -26,17 +26,12 @@
 typedef struct AARQ_apdu {
 	BIT_STRING_t	*protocol_version	/* DEFAULT {version1} */;
 	OBJECT_IDENTIFIER_t	 application_context_name;
-#if 0
 	struct AARQ_user_information {
 		A_SEQUENCE_OF(EXTERNAL_t) list;
 		
 		/* Context for parsing across buffer boundaries */
 		asn_struct_ctx_t _asn_ctx;
 	} *user_information;
-#else
-	/* use the definition from ABRT-apdu.h */
-	struct user_information *user_information;
-#endif
 	
 	/* Context for parsing across buffer boundaries */
 	asn_struct_ctx_t _asn_ctx;
diff -Nru /usr/local/include/osmocom/tcap//ABRT-apdu.h ./ABRT-apdu.h
--- /usr/local/include/osmocom/tcap//ABRT-apdu.h	2010-07-16 12:50:02.000000000 +0200
+++ ./ABRT-apdu.h	2010-07-09 15:40:49.000000000 +0200
@@ -12,7 +12,7 @@
 
 /* Including external dependencies */
 #include "ABRT-source.h"
-#include "EXTERNAL.h"
+#include <EXTERNAL.h>
 #include <asn_SEQUENCE_OF.h>
 #include <constr_SEQUENCE_OF.h>
 #include <constr_SEQUENCE.h>
diff -Nru /usr/local/include/osmocom/tcap//AUDT-apdu.h ./AUDT-apdu.h
--- /usr/local/include/osmocom/tcap//AUDT-apdu.h	2010-07-17 00:09:36.000000000 +0200
+++ ./AUDT-apdu.h	2010-07-09 15:40:49.000000000 +0200
@@ -13,7 +13,7 @@
 /* Including external dependencies */
 #include <BIT_STRING.h>
 #include <OBJECT_IDENTIFIER.h>
-#include "EXTERNAL.h"
+#include <EXTERNAL.h>
 #include <asn_SEQUENCE_OF.h>
 #include <constr_SEQUENCE_OF.h>
 #include <constr_SEQUENCE.h>
@@ -26,16 +26,12 @@
 typedef struct AUDT_apdu {
 	BIT_STRING_t	*protocol_version	/* DEFAULT {version1} */;
 	OBJECT_IDENTIFIER_t	 application_context_name;
-#if 0
 	struct user_information {
 		A_SEQUENCE_OF(EXTERNAL_t) list;
 		
 		/* Context for parsing across buffer boundaries */
 		asn_struct_ctx_t _asn_ctx;
 	} *user_information;
-#else
-	struct user_information *user_information;
-#endif
 	
 	/* Context for parsing across buffer boundaries */
 	asn_struct_ctx_t _asn_ctx;

diff --git a/src/AARE-apdu.c b/src/AARE-apdu.c
index c560c0e..5d1e35a 100644
--- a/src/AARE-apdu.c
+++ b/src/AARE-apdu.c
@@ -7,6 +7,7 @@
 #include <asn_internal.h>
 
 #include "AARE-apdu.h"
+#include "ABRT-apdu.h"
 
 static asn_TYPE_member_t asn_MBR_user_information_7[] = {
 	{ ATF_POINTER, 0, 0,
@@ -24,8 +25,8 @@ static ber_tlv_tag_t asn_DEF_user_information_tags_7[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
 static asn_SET_OF_specifics_t asn_SPC_user_information_specs_7 = {
-	sizeof(struct AARE_user_information),
-	offsetof(struct AARE_user_information, _asn_ctx),
+	sizeof(struct user_information),
+	offsetof(struct user_information, _asn_ctx),
 	0,	/* XER encoding is XMLDelimitedItemList */
 };
 static /* Use -fall-defs-global to expose */
diff --git a/src/AARQ-apdu.c b/src/AARQ-apdu.c
index f8de6f4..2e5ce4f 100644
--- a/src/AARQ-apdu.c
+++ b/src/AARQ-apdu.c
@@ -7,6 +7,7 @@
 #include <asn_internal.h>
 
 #include "AARQ-apdu.h"
+#include "ABRT-apdu.h"
 
 static asn_TYPE_member_t asn_MBR_user_information_5[] = {
 	{ ATF_POINTER, 0, 0,
@@ -24,8 +25,8 @@ static ber_tlv_tag_t asn_DEF_user_information_tags_5[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
 static asn_SET_OF_specifics_t asn_SPC_user_information_specs_5 = {
-	sizeof(struct AARQ_user_information),
-	offsetof(struct AARQ_user_information, _asn_ctx),
+	sizeof(struct user_information),
+	offsetof(struct user_information, _asn_ctx),
 	0,	/* XER encoding is XMLDelimitedItemList */
 };
 static /* Use -fall-defs-global to expose */
diff --git a/src/AUDT-apdu.c b/src/AUDT-apdu.c
index 1ec47fc..81f63c2 100644
--- a/src/AUDT-apdu.c
+++ b/src/AUDT-apdu.c
@@ -7,6 +7,7 @@
 #include <asn_internal.h>
 
 #include "AUDT-apdu.h"
+#include "ABRT-apdu.h"
 
 static asn_TYPE_member_t asn_MBR_user_information_5[] = {
 	{ ATF_POINTER, 0, 0,