UE/ESM: fix esm_pt_start_timer callback

This commit is contained in:
Frédéric Leroy
2017-01-25 13:08:19 +01:00
parent 223247ceb0
commit 55364a8860
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -302,7 +302,7 @@ int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int p
if (rc != RETURNerror) {
/* Start T3482 retransmission timer */
rc = esm_pt_start_timer(pti, msg, T3482_DEFAULT_VALUE,
rc = esm_pt_start_timer(user, pti, msg, T3482_DEFAULT_VALUE,
_pdn_connectivity_t3482_handler);
}
}
@@ -635,7 +635,7 @@ static void *_pdn_connectivity_t3482_handler(void *args)
if (rc != RETURNerror) {
/* Restart the timer T3482 */
rc = esm_pt_start_timer(data->pti, &data->msg, T3482_DEFAULT_VALUE,
rc = esm_pt_start_timer(user, data->pti, &data->msg, T3482_DEFAULT_VALUE,
_pdn_connectivity_t3482_handler);
}
} else {
+2 -3
View File
@@ -191,7 +191,7 @@ int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti
if (rc != RETURNerror) {
/* Start T3482 retransmission timer */
rc = esm_pt_start_timer(pti, msg, T3492_DEFAULT_VALUE,
rc = esm_pt_start_timer(user, pti, msg, T3492_DEFAULT_VALUE,
_pdn_disconnect_t3492_handler);
}
}
@@ -382,7 +382,6 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause)
static void *_pdn_disconnect_t3492_handler(void *args)
{
LOG_FUNC_IN;
// FIXME check callback call
nas_user_t *user = args;
esm_data_t *esm_data = _esm_data;;
int rc;
@@ -411,7 +410,7 @@ static void *_pdn_disconnect_t3492_handler(void *args)
if (rc != RETURNerror) {
/* Restart the timer T3492 */
rc = esm_pt_start_timer(data->pti, &data->msg, T3492_DEFAULT_VALUE,
rc = esm_pt_start_timer(user, data->pti, &data->msg, T3492_DEFAULT_VALUE,
_pdn_disconnect_t3492_handler);
}
} else {
+2 -2
View File
@@ -264,7 +264,7 @@ int esm_pt_release(int pti)
** Others: _esm_pt_data **
** **
***************************************************************************/
int esm_pt_start_timer(int pti, const OctetString *msg,
int esm_pt_start_timer(nas_user_t *user, int pti, const OctetString *msg,
long sec, nas_timer_callback_t cb)
{
LOG_FUNC_IN;
@@ -291,6 +291,7 @@ int esm_pt_start_timer(int pti, const OctetString *msg,
ctx->args = (esm_pt_timer_data_t *)malloc(sizeof(esm_pt_timer_data_t));
if (ctx->args) {
ctx->args->user = user;
/* Set the EPS bearer identity */
ctx->args->pti = pti;
/* Reset the retransmission counter */
@@ -308,7 +309,6 @@ int esm_pt_start_timer(int pti, const OctetString *msg,
* time interval */
ctx->timer.id = nas_timer_start(sec, cb, ctx->args);
ctx->timer.sec = sec;
// FIXME add user
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ void esm_pt_initialize(void);
int esm_pt_assign(void);
int esm_pt_release(int pti);
int esm_pt_start_timer(int pti, const OctetString *msg, long sec,
int esm_pt_start_timer(nas_user_t *user, int pti, const OctetString *msg, long sec,
nas_timer_callback_t cb);
int esm_pt_stop_timer(int pti);