Commit 55364a88 authored by Frédéric Leroy's avatar Frédéric Leroy

UE/ESM: fix esm_pt_start_timer callback

parent 223247ce
......@@ -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 {
......
......@@ -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 {
......
......@@ -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
}
}
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment