diff options
Diffstat (limited to 'openbsc/src/gprs/gprs_gb_parse.c')
-rw-r--r-- | openbsc/src/gprs/gprs_gb_parse.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gb_parse.c b/openbsc/src/gprs/gprs_gb_parse.c index f361951a1..7ae792a62 100644 --- a/openbsc/src/gprs/gprs_gb_parse.c +++ b/openbsc/src/gprs/gprs_gb_parse.c @@ -224,6 +224,7 @@ static int gprs_gb_parse_gmm_detach_req(uint8_t *data, size_t data_len, { uint8_t *value; size_t value_len; + int detach_type; int power_off; parse_ctx->llc_msg_name = "DETACH_REQ"; @@ -234,9 +235,14 @@ static int gprs_gb_parse_gmm_detach_req(uint8_t *data, size_t data_len, /* invalid */ return 0; + detach_type = *value & 0x07; power_off = *value & 0x08 ? 1 : 0; - if (!parse_ctx->to_bss) { + if (parse_ctx->to_bss) { + /* Network originated */ + if (detach_type == GPRS_DET_T_MT_REATT_REQ) + parse_ctx->await_reattach = 1; + } else { /* Mobile originated */ if (power_off) @@ -651,6 +657,10 @@ void gprs_gb_log_parse_context(struct gprs_gb_parse_context *parse_ctx, LOGP(DGPRS, LOGL_DEBUG, "%s invalidate", sep); sep = ","; } + if (parse_ctx->await_reattach) { + LOGP(DGPRS, LOGL_DEBUG, "%s re-attach", sep); + sep = ","; + } LOGP(DGPRS, LOGL_DEBUG, "\n"); } |