oversip 1.3.8 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
 
2
- #line 1 "sip_parser.rl"
2
+ #line 1 "sip_message_parser.rl"
3
3
  #include "sip_parser.h"
4
4
  #include "ext_help.h"
5
5
  #include <stdio.h>
@@ -16,14 +16,14 @@
16
16
 
17
17
  /** machine **/
18
18
 
19
- #line 571 "sip_parser.rl"
19
+ #line 571 "sip_message_parser.rl"
20
20
 
21
21
 
22
22
 
23
23
 
24
24
  /** Data **/
25
25
 
26
- #line 27 "sip_parser.c"
26
+ #line 27 "sip_message_parser.c"
27
27
  static const char _sip_message_parser_actions[] = {
28
28
  0, 1, 3, 1, 5, 1, 6, 1,
29
29
  7, 1, 8, 1, 28, 1, 29, 1,
@@ -28749,19 +28749,19 @@ static const int sip_message_parser_error = 0;
28749
28749
  static const int sip_message_parser_en_main = 1;
28750
28750
 
28751
28751
 
28752
- #line 577 "sip_parser.rl"
28752
+ #line 577 "sip_message_parser.rl"
28753
28753
 
28754
28754
  int sip_message_parser_init(sip_message_parser *parser)
28755
28755
  {
28756
28756
  TRACE();
28757
28757
  int cs = 0;
28758
28758
 
28759
- #line 28760 "sip_parser.c"
28759
+ #line 28760 "sip_message_parser.c"
28760
28760
  {
28761
28761
  cs = sip_message_parser_start;
28762
28762
  }
28763
28763
 
28764
- #line 583 "sip_parser.rl"
28764
+ #line 583 "sip_message_parser.rl"
28765
28765
  parser->cs = cs;
28766
28766
  parser->nread = 0;
28767
28767
  parser->error_start = NULL;
@@ -28819,7 +28819,7 @@ size_t sip_message_parser_execute(sip_message_parser *parser, const char *buffer
28819
28819
  assert(pe - p == len - off && "pointers aren't same distance");
28820
28820
 
28821
28821
 
28822
- #line 28823 "sip_parser.c"
28822
+ #line 28823 "sip_message_parser.c"
28823
28823
  {
28824
28824
  int _klen;
28825
28825
  unsigned int _trans;
@@ -28854,7 +28854,7 @@ _resume:
28854
28854
  case 0: {
28855
28855
  _widec = (short)(128 + ((*p) - -128));
28856
28856
  if (
28857
- #line 170 "sip_parser.rl"
28857
+ #line 170 "sip_message_parser.rl"
28858
28858
 
28859
28859
  parser->method
28860
28860
  ) _widec += 256;
@@ -28928,52 +28928,52 @@ _match:
28928
28928
  switch ( *_acts++ )
28929
28929
  {
28930
28930
  case 0:
28931
- #line 20 "sip_parser.rl"
28931
+ #line 20 "sip_message_parser.rl"
28932
28932
  {
28933
28933
  parser->data_type(parser, sip_request);
28934
28934
  }
28935
28935
  break;
28936
28936
  case 1:
28937
- #line 24 "sip_parser.rl"
28937
+ #line 24 "sip_message_parser.rl"
28938
28938
  {
28939
28939
  parser->data_type(parser, sip_response);
28940
28940
  }
28941
28941
  break;
28942
28942
  case 2:
28943
- #line 28 "sip_parser.rl"
28943
+ #line 28 "sip_message_parser.rl"
28944
28944
  {
28945
28945
  parser->data_type(parser, outbound_keepalive);
28946
28946
  }
28947
28947
  break;
28948
28948
  case 3:
28949
- #line 33 "sip_parser.rl"
28949
+ #line 33 "sip_message_parser.rl"
28950
28950
  { MARK(mark, p); }
28951
28951
  break;
28952
28952
  case 4:
28953
- #line 35 "sip_parser.rl"
28953
+ #line 35 "sip_message_parser.rl"
28954
28954
  {
28955
28955
  MARK(hdr_field_start, p);
28956
28956
  }
28957
28957
  break;
28958
28958
  case 5:
28959
- #line 39 "sip_parser.rl"
28959
+ #line 39 "sip_message_parser.rl"
28960
28960
  {
28961
28961
  parser->hdr_field_len = LEN(hdr_field_start, p);
28962
28962
  parser->hdr_field_name = header_field_any;
28963
28963
  }
28964
28964
  break;
28965
28965
  case 6:
28966
- #line 44 "sip_parser.rl"
28966
+ #line 44 "sip_message_parser.rl"
28967
28967
  { MARK(hdr_value_start, p); }
28968
28968
  break;
28969
28969
  case 7:
28970
- #line 46 "sip_parser.rl"
28970
+ #line 46 "sip_message_parser.rl"
28971
28971
  {
28972
28972
  parser->hdr_value_len = LEN(hdr_value_start, p);
28973
28973
  }
28974
28974
  break;
28975
28975
  case 8:
28976
- #line 50 "sip_parser.rl"
28976
+ #line 50 "sip_message_parser.rl"
28977
28977
  {
28978
28978
  if (parser->hdr_value_start) {
28979
28979
  parser->header(parser->parsed, PTR_TO(hdr_field_start), parser->hdr_field_len, PTR_TO(hdr_value_start), parser->hdr_value_len, parser->hdr_field_name);
@@ -28981,7 +28981,7 @@ _match:
28981
28981
  }
28982
28982
  break;
28983
28983
  case 9:
28984
- #line 57 "sip_parser.rl"
28984
+ #line 57 "sip_message_parser.rl"
28985
28985
  {
28986
28986
  if (!parser->method) {
28987
28987
  parser->method = method_INVITE;
@@ -28989,7 +28989,7 @@ _match:
28989
28989
  }
28990
28990
  break;
28991
28991
  case 10:
28992
- #line 63 "sip_parser.rl"
28992
+ #line 63 "sip_message_parser.rl"
28993
28993
  {
28994
28994
  if (!parser->method) {
28995
28995
  parser->method = method_ACK;
@@ -28997,7 +28997,7 @@ _match:
28997
28997
  }
28998
28998
  break;
28999
28999
  case 11:
29000
- #line 69 "sip_parser.rl"
29000
+ #line 69 "sip_message_parser.rl"
29001
29001
  {
29002
29002
  if (!parser->method) {
29003
29003
  parser->method = method_CANCEL;
@@ -29005,7 +29005,7 @@ _match:
29005
29005
  }
29006
29006
  break;
29007
29007
  case 12:
29008
- #line 75 "sip_parser.rl"
29008
+ #line 75 "sip_message_parser.rl"
29009
29009
  {
29010
29010
  if (!parser->method) {
29011
29011
  parser->method = method_PRACK;
@@ -29013,7 +29013,7 @@ _match:
29013
29013
  }
29014
29014
  break;
29015
29015
  case 13:
29016
- #line 81 "sip_parser.rl"
29016
+ #line 81 "sip_message_parser.rl"
29017
29017
  {
29018
29018
  if (!parser->method) {
29019
29019
  parser->method = method_BYE;
@@ -29021,7 +29021,7 @@ _match:
29021
29021
  }
29022
29022
  break;
29023
29023
  case 14:
29024
- #line 87 "sip_parser.rl"
29024
+ #line 87 "sip_message_parser.rl"
29025
29025
  {
29026
29026
  if (!parser->method) {
29027
29027
  parser->method = method_REFER;
@@ -29029,7 +29029,7 @@ _match:
29029
29029
  }
29030
29030
  break;
29031
29031
  case 15:
29032
- #line 93 "sip_parser.rl"
29032
+ #line 93 "sip_message_parser.rl"
29033
29033
  {
29034
29034
  if (!parser->method) {
29035
29035
  parser->method = method_INFO;
@@ -29037,7 +29037,7 @@ _match:
29037
29037
  }
29038
29038
  break;
29039
29039
  case 16:
29040
- #line 99 "sip_parser.rl"
29040
+ #line 99 "sip_message_parser.rl"
29041
29041
  {
29042
29042
  if (!parser->method) {
29043
29043
  parser->method = method_UPDATE;
@@ -29045,7 +29045,7 @@ _match:
29045
29045
  }
29046
29046
  break;
29047
29047
  case 17:
29048
- #line 105 "sip_parser.rl"
29048
+ #line 105 "sip_message_parser.rl"
29049
29049
  {
29050
29050
  if (!parser->method_set) {
29051
29051
  parser->method = method_OPTIONS;
@@ -29054,7 +29054,7 @@ _match:
29054
29054
  }
29055
29055
  break;
29056
29056
  case 18:
29057
- #line 112 "sip_parser.rl"
29057
+ #line 112 "sip_message_parser.rl"
29058
29058
  {
29059
29059
  if (!parser->method) {
29060
29060
  parser->method = method_REGISTER;
@@ -29062,7 +29062,7 @@ _match:
29062
29062
  }
29063
29063
  break;
29064
29064
  case 19:
29065
- #line 118 "sip_parser.rl"
29065
+ #line 118 "sip_message_parser.rl"
29066
29066
  {
29067
29067
  if (!parser->method) {
29068
29068
  parser->method = method_MESSAGE;
@@ -29070,7 +29070,7 @@ _match:
29070
29070
  }
29071
29071
  break;
29072
29072
  case 20:
29073
- #line 124 "sip_parser.rl"
29073
+ #line 124 "sip_message_parser.rl"
29074
29074
  {
29075
29075
  if (!parser->method) {
29076
29076
  parser->method = method_SUBSCRIBE;
@@ -29078,7 +29078,7 @@ _match:
29078
29078
  }
29079
29079
  break;
29080
29080
  case 21:
29081
- #line 130 "sip_parser.rl"
29081
+ #line 130 "sip_message_parser.rl"
29082
29082
  {
29083
29083
  if (!parser->method) {
29084
29084
  parser->method = method_NOTIFY;
@@ -29086,7 +29086,7 @@ _match:
29086
29086
  }
29087
29087
  break;
29088
29088
  case 22:
29089
- #line 136 "sip_parser.rl"
29089
+ #line 136 "sip_message_parser.rl"
29090
29090
  {
29091
29091
  if (!parser->method) {
29092
29092
  parser->method = method_PUBLISH;
@@ -29094,7 +29094,7 @@ _match:
29094
29094
  }
29095
29095
  break;
29096
29096
  case 23:
29097
- #line 142 "sip_parser.rl"
29097
+ #line 142 "sip_message_parser.rl"
29098
29098
  {
29099
29099
  if (!parser->method) {
29100
29100
  parser->method = method_PULL;
@@ -29102,7 +29102,7 @@ _match:
29102
29102
  }
29103
29103
  break;
29104
29104
  case 24:
29105
- #line 148 "sip_parser.rl"
29105
+ #line 148 "sip_message_parser.rl"
29106
29106
  {
29107
29107
  if (!parser->method) {
29108
29108
  parser->method = method_PUSH;
@@ -29110,7 +29110,7 @@ _match:
29110
29110
  }
29111
29111
  break;
29112
29112
  case 25:
29113
- #line 154 "sip_parser.rl"
29113
+ #line 154 "sip_message_parser.rl"
29114
29114
  {
29115
29115
  if (!parser->method) {
29116
29116
  parser->method = method_STORE;
@@ -29118,7 +29118,7 @@ _match:
29118
29118
  }
29119
29119
  break;
29120
29120
  case 26:
29121
- #line 160 "sip_parser.rl"
29121
+ #line 160 "sip_message_parser.rl"
29122
29122
  {
29123
29123
  if (!parser->method) {
29124
29124
  parser->method = method_unknown;
@@ -29126,37 +29126,37 @@ _match:
29126
29126
  }
29127
29127
  break;
29128
29128
  case 27:
29129
- #line 166 "sip_parser.rl"
29129
+ #line 166 "sip_message_parser.rl"
29130
29130
  {
29131
29131
  parser->message.method(parser->parsed, PTR_TO(mark), LEN(mark, p), parser->method);
29132
29132
  }
29133
29133
  break;
29134
29134
  case 28:
29135
- #line 175 "sip_parser.rl"
29135
+ #line 175 "sip_message_parser.rl"
29136
29136
  {
29137
29137
  parser->message.sip_version(parser->parsed, PTR_TO(mark), LEN(mark, p));
29138
29138
  }
29139
29139
  break;
29140
29140
  case 29:
29141
- #line 179 "sip_parser.rl"
29141
+ #line 179 "sip_message_parser.rl"
29142
29142
  {
29143
29143
  parser->message.status_code(parser->parsed, PTR_TO(mark), LEN(mark, p));
29144
29144
  }
29145
29145
  break;
29146
29146
  case 30:
29147
- #line 183 "sip_parser.rl"
29147
+ #line 183 "sip_message_parser.rl"
29148
29148
  {
29149
29149
  parser->message.reason_phrase(parser->parsed, PTR_TO(mark), LEN(mark, p));
29150
29150
  }
29151
29151
  break;
29152
29152
  case 31:
29153
- #line 188 "sip_parser.rl"
29153
+ #line 188 "sip_message_parser.rl"
29154
29154
  {
29155
29155
  MARK(header_param_key_start, p);
29156
29156
  }
29157
29157
  break;
29158
29158
  case 32:
29159
- #line 192 "sip_parser.rl"
29159
+ #line 192 "sip_message_parser.rl"
29160
29160
  {
29161
29161
  parser->header_param_key_len = LEN(header_param_key_start, p);
29162
29162
  /* If current param has no value don't take previous param's value. */
@@ -29164,213 +29164,213 @@ _match:
29164
29164
  }
29165
29165
  break;
29166
29166
  case 33:
29167
- #line 198 "sip_parser.rl"
29167
+ #line 198 "sip_message_parser.rl"
29168
29168
  {
29169
29169
  MARK(header_param_value_start, p);
29170
29170
  }
29171
29171
  break;
29172
29172
  case 34:
29173
- #line 202 "sip_parser.rl"
29173
+ #line 202 "sip_message_parser.rl"
29174
29174
  {
29175
29175
  parser->header_param_value_len = LEN(header_param_value_start, p);
29176
29176
  }
29177
29177
  break;
29178
29178
  case 35:
29179
- #line 207 "sip_parser.rl"
29179
+ #line 207 "sip_message_parser.rl"
29180
29180
  {
29181
29181
  parser->hdr_field_name = header_field_via;
29182
29182
  }
29183
29183
  break;
29184
29184
  case 36:
29185
- #line 211 "sip_parser.rl"
29185
+ #line 211 "sip_message_parser.rl"
29186
29186
  { parser->num_via++; }
29187
29187
  break;
29188
29188
  case 37:
29189
- #line 213 "sip_parser.rl"
29189
+ #line 213 "sip_message_parser.rl"
29190
29190
  {
29191
29191
  if (parser->num_via == 1)
29192
29192
  parser->message.via_sent_by_host(parser->parsed, PTR_TO(mark), LEN(mark, p));
29193
29193
  }
29194
29194
  break;
29195
29195
  case 38:
29196
- #line 218 "sip_parser.rl"
29196
+ #line 218 "sip_message_parser.rl"
29197
29197
  {
29198
29198
  if (parser->num_via == 1)
29199
29199
  parser->message.via_sent_by_port(parser->parsed, PTR_TO(mark), LEN(mark, p));
29200
29200
  }
29201
29201
  break;
29202
29202
  case 39:
29203
- #line 223 "sip_parser.rl"
29203
+ #line 223 "sip_message_parser.rl"
29204
29204
  {
29205
29205
  if (parser->num_via == 1)
29206
29206
  parser->message.via_branch(parser->parsed, PTR_TO(mark), LEN(mark, p));
29207
29207
  }
29208
29208
  break;
29209
29209
  case 40:
29210
- #line 228 "sip_parser.rl"
29210
+ #line 228 "sip_message_parser.rl"
29211
29211
  {
29212
29212
  if (parser->num_via == 1)
29213
29213
  parser->message.via_branch_rfc3261(parser->parsed, PTR_TO(mark), LEN(mark, p));
29214
29214
  }
29215
29215
  break;
29216
29216
  case 41:
29217
- #line 233 "sip_parser.rl"
29217
+ #line 233 "sip_message_parser.rl"
29218
29218
  {
29219
29219
  if (parser->num_via == 1)
29220
29220
  parser->message.via_received(parser->parsed, PTR_TO(mark), LEN(mark, p));
29221
29221
  }
29222
29222
  break;
29223
29223
  case 42:
29224
- #line 238 "sip_parser.rl"
29224
+ #line 238 "sip_message_parser.rl"
29225
29225
  {
29226
29226
  if (parser->num_via == 1)
29227
29227
  parser->message.via_has_rport(parser->parsed);
29228
29228
  }
29229
29229
  break;
29230
29230
  case 43:
29231
- #line 243 "sip_parser.rl"
29231
+ #line 243 "sip_message_parser.rl"
29232
29232
  {
29233
29233
  if (parser->num_via == 1)
29234
29234
  parser->message.via_has_alias(parser->parsed);
29235
29235
  }
29236
29236
  break;
29237
29237
  case 44:
29238
- #line 248 "sip_parser.rl"
29238
+ #line 248 "sip_message_parser.rl"
29239
29239
  {
29240
29240
  if (parser->num_via == 1)
29241
29241
  parser->message.header_core_value(parser->parsed, header_field_via, PTR_TO(hdr_value_start), LEN(hdr_value_start, p));
29242
29242
  }
29243
29243
  break;
29244
29244
  case 45:
29245
- #line 253 "sip_parser.rl"
29245
+ #line 253 "sip_message_parser.rl"
29246
29246
  {
29247
29247
  if (parser->num_via == 1)
29248
29248
  parser->message.header_param(parser->parsed, header_field_via, PTR_TO(header_param_key_start), parser->header_param_key_len, PTR_TO(header_param_value_start), parser->header_param_value_len);
29249
29249
  }
29250
29250
  break;
29251
29251
  case 46:
29252
- #line 258 "sip_parser.rl"
29252
+ #line 258 "sip_message_parser.rl"
29253
29253
  { parser->num_call_id++; }
29254
29254
  break;
29255
29255
  case 47:
29256
- #line 260 "sip_parser.rl"
29256
+ #line 260 "sip_message_parser.rl"
29257
29257
  {
29258
29258
  if (parser->num_call_id == 1)
29259
29259
  parser->message.call_id(parser->parsed, PTR_TO(mark), LEN(mark, p));
29260
29260
  }
29261
29261
  break;
29262
29262
  case 48:
29263
- #line 265 "sip_parser.rl"
29263
+ #line 265 "sip_message_parser.rl"
29264
29264
  { parser->num_cseq++; }
29265
29265
  break;
29266
29266
  case 49:
29267
- #line 267 "sip_parser.rl"
29267
+ #line 267 "sip_message_parser.rl"
29268
29268
  {
29269
29269
  if (parser->num_cseq == 1)
29270
29270
  parser->message.cseq_number(parser->parsed, PTR_TO(mark), LEN(mark, p));
29271
29271
  }
29272
29272
  break;
29273
29273
  case 50:
29274
- #line 272 "sip_parser.rl"
29274
+ #line 272 "sip_message_parser.rl"
29275
29275
  { parser->num_max_forwards++; }
29276
29276
  break;
29277
29277
  case 51:
29278
- #line 274 "sip_parser.rl"
29278
+ #line 274 "sip_message_parser.rl"
29279
29279
  {
29280
29280
  if (parser->num_max_forwards == 1)
29281
29281
  parser->message.max_forwards(parser->parsed, PTR_TO(mark), LEN(mark, p));
29282
29282
  }
29283
29283
  break;
29284
29284
  case 52:
29285
- #line 279 "sip_parser.rl"
29285
+ #line 279 "sip_message_parser.rl"
29286
29286
  { parser->num_content_length++; }
29287
29287
  break;
29288
29288
  case 53:
29289
- #line 281 "sip_parser.rl"
29289
+ #line 281 "sip_message_parser.rl"
29290
29290
  {
29291
29291
  if (parser->num_content_length == 1)
29292
29292
  parser->message.content_length(parser->parsed, PTR_TO(mark), LEN(mark, p));
29293
29293
  }
29294
29294
  break;
29295
29295
  case 54:
29296
- #line 287 "sip_parser.rl"
29296
+ #line 287 "sip_message_parser.rl"
29297
29297
  {
29298
29298
  if (parser->do_uri)
29299
29299
  parser->uri_scheme = uri_scheme_sip;
29300
29300
  }
29301
29301
  break;
29302
29302
  case 55:
29303
- #line 292 "sip_parser.rl"
29303
+ #line 292 "sip_message_parser.rl"
29304
29304
  {
29305
29305
  if (parser->do_uri)
29306
29306
  parser->uri_scheme = uri_scheme_sips;
29307
29307
  }
29308
29308
  break;
29309
29309
  case 56:
29310
- #line 297 "sip_parser.rl"
29310
+ #line 297 "sip_message_parser.rl"
29311
29311
  {
29312
29312
  if (parser->do_uri)
29313
29313
  parser->uri_scheme = uri_scheme_tel;
29314
29314
  }
29315
29315
  break;
29316
29316
  case 57:
29317
- #line 302 "sip_parser.rl"
29317
+ #line 302 "sip_message_parser.rl"
29318
29318
  {
29319
29319
  if (parser->do_uri)
29320
29320
  parser->uri_scheme = uri_scheme_unknown;
29321
29321
  }
29322
29322
  break;
29323
29323
  case 58:
29324
- #line 307 "sip_parser.rl"
29324
+ #line 307 "sip_message_parser.rl"
29325
29325
  {
29326
29326
  if (parser->do_uri)
29327
29327
  parser->uri.scheme(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), parser->uri_scheme);
29328
29328
  }
29329
29329
  break;
29330
29330
  case 59:
29331
- #line 312 "sip_parser.rl"
29331
+ #line 312 "sip_message_parser.rl"
29332
29332
  {
29333
29333
  if (parser->do_uri)
29334
29334
  parser->uri.user(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), parser->uri_scheme);
29335
29335
  }
29336
29336
  break;
29337
29337
  case 60:
29338
- #line 317 "sip_parser.rl"
29338
+ #line 317 "sip_message_parser.rl"
29339
29339
  {
29340
29340
  if (parser->do_uri)
29341
29341
  parser->uri.host(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), host_type_domain);
29342
29342
  }
29343
29343
  break;
29344
29344
  case 61:
29345
- #line 322 "sip_parser.rl"
29345
+ #line 322 "sip_message_parser.rl"
29346
29346
  {
29347
29347
  if (parser->do_uri)
29348
29348
  parser->uri.host(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), host_type_ipv4);
29349
29349
  }
29350
29350
  break;
29351
29351
  case 62:
29352
- #line 327 "sip_parser.rl"
29352
+ #line 327 "sip_message_parser.rl"
29353
29353
  {
29354
29354
  if (parser->do_uri)
29355
29355
  parser->uri.host(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), host_type_ipv6);
29356
29356
  }
29357
29357
  break;
29358
29358
  case 63:
29359
- #line 332 "sip_parser.rl"
29359
+ #line 332 "sip_message_parser.rl"
29360
29360
  {
29361
29361
  if (parser->do_uri)
29362
29362
  parser->uri.port(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), parser->uri_scheme);
29363
29363
  }
29364
29364
  break;
29365
29365
  case 64:
29366
- #line 338 "sip_parser.rl"
29366
+ #line 338 "sip_message_parser.rl"
29367
29367
  {
29368
29368
  if (parser->do_uri)
29369
29369
  MARK(uri_param_key_start, p);
29370
29370
  }
29371
29371
  break;
29372
29372
  case 65:
29373
- #line 343 "sip_parser.rl"
29373
+ #line 343 "sip_message_parser.rl"
29374
29374
  {
29375
29375
  if (parser->do_uri) {
29376
29376
  parser->uri_param_key_len = LEN(uri_param_key_start, p);
@@ -29380,112 +29380,112 @@ _match:
29380
29380
  }
29381
29381
  break;
29382
29382
  case 66:
29383
- #line 351 "sip_parser.rl"
29383
+ #line 351 "sip_message_parser.rl"
29384
29384
  {
29385
29385
  if (parser->do_uri)
29386
29386
  MARK(uri_param_value_start, p);
29387
29387
  }
29388
29388
  break;
29389
29389
  case 67:
29390
- #line 356 "sip_parser.rl"
29390
+ #line 356 "sip_message_parser.rl"
29391
29391
  {
29392
29392
  if (parser->do_uri)
29393
29393
  parser->uri_param_value_len = LEN(uri_param_value_start, p);
29394
29394
  }
29395
29395
  break;
29396
29396
  case 68:
29397
- #line 361 "sip_parser.rl"
29397
+ #line 361 "sip_message_parser.rl"
29398
29398
  {
29399
29399
  if (parser->do_uri == 1)
29400
29400
  parser->uri.param(parser->parsed, parser->uri_owner, PTR_TO(uri_param_key_start), parser->uri_param_key_len, PTR_TO(uri_param_value_start), parser->uri_param_value_len);
29401
29401
  }
29402
29402
  break;
29403
29403
  case 69:
29404
- #line 367 "sip_parser.rl"
29404
+ #line 367 "sip_message_parser.rl"
29405
29405
  {
29406
29406
  if (parser->do_uri)
29407
29407
  parser->uri.headers(parser->parsed, parser->uri_owner, PTR_TO(mark), LEN(mark, p), parser->uri_scheme);
29408
29408
  }
29409
29409
  break;
29410
29410
  case 70:
29411
- #line 372 "sip_parser.rl"
29411
+ #line 372 "sip_message_parser.rl"
29412
29412
  {
29413
29413
  if (parser->do_uri)
29414
29414
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_tel_phone_context, PTR_TO(mark), LEN(mark, p), 0);
29415
29415
  }
29416
29416
  break;
29417
29417
  case 71:
29418
- #line 377 "sip_parser.rl"
29418
+ #line 377 "sip_message_parser.rl"
29419
29419
  {
29420
29420
  if (parser->do_uri)
29421
29421
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_udp);
29422
29422
  }
29423
29423
  break;
29424
29424
  case 72:
29425
- #line 382 "sip_parser.rl"
29425
+ #line 382 "sip_message_parser.rl"
29426
29426
  {
29427
29427
  if (parser->do_uri)
29428
29428
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_tcp);
29429
29429
  }
29430
29430
  break;
29431
29431
  case 73:
29432
- #line 387 "sip_parser.rl"
29432
+ #line 387 "sip_message_parser.rl"
29433
29433
  {
29434
29434
  if (parser->do_uri)
29435
29435
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_tls);
29436
29436
  }
29437
29437
  break;
29438
29438
  case 74:
29439
- #line 392 "sip_parser.rl"
29439
+ #line 392 "sip_message_parser.rl"
29440
29440
  {
29441
29441
  if (parser->do_uri)
29442
29442
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_sctp);
29443
29443
  }
29444
29444
  break;
29445
29445
  case 75:
29446
- #line 397 "sip_parser.rl"
29446
+ #line 397 "sip_message_parser.rl"
29447
29447
  {
29448
29448
  if (parser->do_uri)
29449
29449
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_ws);
29450
29450
  }
29451
29451
  break;
29452
29452
  case 76:
29453
- #line 402 "sip_parser.rl"
29453
+ #line 402 "sip_message_parser.rl"
29454
29454
  {
29455
29455
  if (parser->do_uri)
29456
29456
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_wss);
29457
29457
  }
29458
29458
  break;
29459
29459
  case 77:
29460
- #line 407 "sip_parser.rl"
29460
+ #line 407 "sip_message_parser.rl"
29461
29461
  {
29462
29462
  if (parser->do_uri)
29463
29463
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_transport, PTR_TO(mark), LEN(mark, p), transport_unknown);
29464
29464
  }
29465
29465
  break;
29466
29466
  case 78:
29467
- #line 412 "sip_parser.rl"
29467
+ #line 412 "sip_message_parser.rl"
29468
29468
  {
29469
29469
  if (parser->do_uri)
29470
29470
  parser->uri.has_param(parser->parsed, parser->uri_owner, uri_param_lr);
29471
29471
  }
29472
29472
  break;
29473
29473
  case 79:
29474
- #line 417 "sip_parser.rl"
29474
+ #line 417 "sip_message_parser.rl"
29475
29475
  {
29476
29476
  if (parser->do_uri)
29477
29477
  parser->uri.has_param(parser->parsed, parser->uri_owner, uri_param_ob);
29478
29478
  }
29479
29479
  break;
29480
29480
  case 80:
29481
- #line 422 "sip_parser.rl"
29481
+ #line 422 "sip_message_parser.rl"
29482
29482
  {
29483
29483
  if (parser->do_uri)
29484
29484
  parser->uri.known_param(parser->parsed, parser->uri_owner, uri_param_ovid, PTR_TO(mark), LEN(mark, p), 0);
29485
29485
  }
29486
29486
  break;
29487
29487
  case 81:
29488
- #line 427 "sip_parser.rl"
29488
+ #line 427 "sip_message_parser.rl"
29489
29489
  {
29490
29490
  if (parser->do_uri)
29491
29491
  if (!parser->uri_display_name_quoted)
@@ -29495,20 +29495,20 @@ _match:
29495
29495
  }
29496
29496
  break;
29497
29497
  case 82:
29498
- #line 436 "sip_parser.rl"
29498
+ #line 436 "sip_message_parser.rl"
29499
29499
  {
29500
29500
  parser->uri_display_name_quoted=1;
29501
29501
  }
29502
29502
  break;
29503
29503
  case 83:
29504
- #line 440 "sip_parser.rl"
29504
+ #line 440 "sip_message_parser.rl"
29505
29505
  {
29506
29506
  if (parser->do_uri)
29507
29507
  MARK(uri_start, p);
29508
29508
  }
29509
29509
  break;
29510
29510
  case 84:
29511
- #line 445 "sip_parser.rl"
29511
+ #line 445 "sip_message_parser.rl"
29512
29512
  {
29513
29513
  if (parser->do_uri)
29514
29514
  parser->uri.full(parser->parsed, parser->uri_owner, PTR_TO(uri_start), LEN(uri_start, p), parser->uri_scheme);
@@ -29520,29 +29520,29 @@ _match:
29520
29520
  }
29521
29521
  break;
29522
29522
  case 85:
29523
- #line 455 "sip_parser.rl"
29523
+ #line 455 "sip_message_parser.rl"
29524
29524
  { parser->message.init_component(parser->parsed, component_ruri); }
29525
29525
  break;
29526
29526
  case 86:
29527
- #line 457 "sip_parser.rl"
29527
+ #line 457 "sip_message_parser.rl"
29528
29528
  {
29529
29529
  parser->do_uri = 1;
29530
29530
  parser->uri_owner = uri_owner_ruri;
29531
29531
  }
29532
29532
  break;
29533
29533
  case 87:
29534
- #line 462 "sip_parser.rl"
29534
+ #line 462 "sip_message_parser.rl"
29535
29535
  {
29536
29536
  parser->message.init_component(parser->parsed, component_from);
29537
29537
  parser->hdr_field_name = header_field_from;
29538
29538
  }
29539
29539
  break;
29540
29540
  case 88:
29541
- #line 467 "sip_parser.rl"
29541
+ #line 467 "sip_message_parser.rl"
29542
29542
  { parser->num_from++; }
29543
29543
  break;
29544
29544
  case 89:
29545
- #line 469 "sip_parser.rl"
29545
+ #line 469 "sip_message_parser.rl"
29546
29546
  {
29547
29547
  if (parser->num_from == 1) {
29548
29548
  parser->do_uri = 1;
@@ -29551,18 +29551,18 @@ _match:
29551
29551
  }
29552
29552
  break;
29553
29553
  case 90:
29554
- #line 476 "sip_parser.rl"
29554
+ #line 476 "sip_message_parser.rl"
29555
29555
  {
29556
29556
  parser->message.init_component(parser->parsed, component_to);
29557
29557
  parser->hdr_field_name = header_field_to;
29558
29558
  }
29559
29559
  break;
29560
29560
  case 91:
29561
- #line 481 "sip_parser.rl"
29561
+ #line 481 "sip_message_parser.rl"
29562
29562
  { parser->num_to++; }
29563
29563
  break;
29564
29564
  case 92:
29565
- #line 483 "sip_parser.rl"
29565
+ #line 483 "sip_message_parser.rl"
29566
29566
  {
29567
29567
  if (parser->num_to == 1) {
29568
29568
  parser->do_uri = 1;
@@ -29571,19 +29571,19 @@ _match:
29571
29571
  }
29572
29572
  break;
29573
29573
  case 93:
29574
- #line 491 "sip_parser.rl"
29574
+ #line 491 "sip_message_parser.rl"
29575
29575
  {
29576
29576
  parser->message.from_tag(parser->parsed, PTR_TO(mark), LEN(mark, p));
29577
29577
  }
29578
29578
  break;
29579
29579
  case 94:
29580
- #line 495 "sip_parser.rl"
29580
+ #line 495 "sip_message_parser.rl"
29581
29581
  {
29582
29582
  parser->message.to_tag(parser->parsed, PTR_TO(mark), LEN(mark, p));
29583
29583
  }
29584
29584
  break;
29585
29585
  case 95:
29586
- #line 500 "sip_parser.rl"
29586
+ #line 500 "sip_message_parser.rl"
29587
29587
  {
29588
29588
  if (parser->route_found == 0) {
29589
29589
  parser->message.init_component(parser->parsed, component_route);
@@ -29593,30 +29593,30 @@ _match:
29593
29593
  }
29594
29594
  break;
29595
29595
  case 96:
29596
- #line 508 "sip_parser.rl"
29596
+ #line 508 "sip_message_parser.rl"
29597
29597
  {
29598
29598
  parser->message.init_component(parser->parsed, component_route_uri); }
29599
29599
  break;
29600
29600
  case 97:
29601
- #line 511 "sip_parser.rl"
29601
+ #line 511 "sip_message_parser.rl"
29602
29602
  {
29603
29603
  parser->do_uri = 1;
29604
29604
  parser->uri_owner = uri_owner_route;
29605
29605
  }
29606
29606
  break;
29607
29607
  case 98:
29608
- #line 517 "sip_parser.rl"
29608
+ #line 517 "sip_message_parser.rl"
29609
29609
  {
29610
29610
  parser->message.init_component(parser->parsed, component_contact);
29611
29611
  parser->hdr_field_name = header_field_contact;
29612
29612
  }
29613
29613
  break;
29614
29614
  case 99:
29615
- #line 522 "sip_parser.rl"
29615
+ #line 522 "sip_message_parser.rl"
29616
29616
  { parser->num_contact++; }
29617
29617
  break;
29618
29618
  case 100:
29619
- #line 524 "sip_parser.rl"
29619
+ #line 524 "sip_message_parser.rl"
29620
29620
  {
29621
29621
  if (parser->num_contact == 1) {
29622
29622
  parser->do_uri = 1;
@@ -29625,54 +29625,54 @@ _match:
29625
29625
  }
29626
29626
  break;
29627
29627
  case 101:
29628
- #line 536 "sip_parser.rl"
29628
+ #line 536 "sip_message_parser.rl"
29629
29629
  {
29630
29630
  if (parser->num_contact == 1)
29631
29631
  parser->message.contact_params(parser->parsed, PTR_TO(mark), LEN(mark, p));
29632
29632
  }
29633
29633
  break;
29634
29634
  case 102:
29635
- #line 541 "sip_parser.rl"
29635
+ #line 541 "sip_message_parser.rl"
29636
29636
  {
29637
29637
  if (parser->num_contact == 1)
29638
29638
  parser->message.contact_has_reg_id(parser->parsed);
29639
29639
  }
29640
29640
  break;
29641
29641
  case 103:
29642
- #line 546 "sip_parser.rl"
29642
+ #line 546 "sip_message_parser.rl"
29643
29643
  {
29644
29644
  parser->contact_is_valid = 1;
29645
29645
  }
29646
29646
  break;
29647
29647
  case 104:
29648
- #line 550 "sip_parser.rl"
29648
+ #line 550 "sip_message_parser.rl"
29649
29649
  {
29650
29650
  parser->contact_is_valid = 0;
29651
29651
  }
29652
29652
  break;
29653
29653
  case 105:
29654
- #line 555 "sip_parser.rl"
29654
+ #line 555 "sip_message_parser.rl"
29655
29655
  {
29656
29656
  parser->message.option_tag(parser->parsed, header_field_require, PTR_TO(mark), LEN(mark, p));
29657
29657
  }
29658
29658
  break;
29659
29659
  case 106:
29660
- #line 559 "sip_parser.rl"
29660
+ #line 559 "sip_message_parser.rl"
29661
29661
  {
29662
29662
  parser->message.option_tag(parser->parsed, header_field_proxy_require, PTR_TO(mark), LEN(mark, p));
29663
29663
  }
29664
29664
  break;
29665
29665
  case 107:
29666
- #line 563 "sip_parser.rl"
29666
+ #line 563 "sip_message_parser.rl"
29667
29667
  {
29668
29668
  parser->message.option_tag(parser->parsed, header_field_supported, PTR_TO(mark), LEN(mark, p));
29669
29669
  }
29670
29670
  break;
29671
29671
  case 108:
29672
- #line 568 "sip_parser.rl"
29672
+ #line 568 "sip_message_parser.rl"
29673
29673
  { {p++; goto _out; } }
29674
29674
  break;
29675
- #line 29676 "sip_parser.c"
29675
+ #line 29676 "sip_message_parser.c"
29676
29676
  }
29677
29677
  }
29678
29678
 
@@ -29685,7 +29685,7 @@ _again:
29685
29685
  _out: {}
29686
29686
  }
29687
29687
 
29688
- #line 640 "sip_parser.rl"
29688
+ #line 640 "sip_message_parser.rl"
29689
29689
 
29690
29690
  parser->cs = cs;
29691
29691
  parser->nread += p - (buffer + off);