Skip to content
Snippets Groups Projects
Commit 6500eac9 authored by FredericLeroy's avatar FredericLeroy
Browse files

UE/ESM: fix esm_pt_start_timer callback

parent abc9382d
No related branches found
No related tags found
No related merge requests found
...@@ -309,7 +309,7 @@ int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int p ...@@ -309,7 +309,7 @@ int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int p
if (rc != RETURNerror) { if (rc != RETURNerror) {
/* Start T3482 retransmission timer */ /* 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); _pdn_connectivity_t3482_handler);
} }
} }
...@@ -642,7 +642,7 @@ static void *_pdn_connectivity_t3482_handler(void *args) ...@@ -642,7 +642,7 @@ static void *_pdn_connectivity_t3482_handler(void *args)
if (rc != RETURNerror) { if (rc != RETURNerror) {
/* Restart the timer T3482 */ /* 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); _pdn_connectivity_t3482_handler);
} }
} else { } else {
......
...@@ -198,7 +198,7 @@ int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti ...@@ -198,7 +198,7 @@ int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti
if (rc != RETURNerror) { if (rc != RETURNerror) {
/* Start T3482 retransmission timer */ /* 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); _pdn_disconnect_t3492_handler);
} }
} }
...@@ -389,7 +389,6 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause) ...@@ -389,7 +389,6 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause)
static void *_pdn_disconnect_t3492_handler(void *args) static void *_pdn_disconnect_t3492_handler(void *args)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
// FIXME check callback call
nas_user_t *user = args; nas_user_t *user = args;
esm_data_t *esm_data = _esm_data;; esm_data_t *esm_data = _esm_data;;
int rc; int rc;
...@@ -418,7 +417,7 @@ static void *_pdn_disconnect_t3492_handler(void *args) ...@@ -418,7 +417,7 @@ static void *_pdn_disconnect_t3492_handler(void *args)
if (rc != RETURNerror) { if (rc != RETURNerror) {
/* Restart the timer T3492 */ /* 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); _pdn_disconnect_t3492_handler);
} }
} else { } else {
......
...@@ -271,7 +271,7 @@ int esm_pt_release(int pti) ...@@ -271,7 +271,7 @@ int esm_pt_release(int pti)
** Others: _esm_pt_data ** ** 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) long sec, nas_timer_callback_t cb)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
...@@ -298,6 +298,7 @@ int esm_pt_start_timer(int pti, const OctetString *msg, ...@@ -298,6 +298,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)); ctx->args = (esm_pt_timer_data_t *)malloc(sizeof(esm_pt_timer_data_t));
if (ctx->args) { if (ctx->args) {
ctx->args->user = user;
/* Set the EPS bearer identity */ /* Set the EPS bearer identity */
ctx->args->pti = pti; ctx->args->pti = pti;
/* Reset the retransmission counter */ /* Reset the retransmission counter */
...@@ -315,7 +316,6 @@ int esm_pt_start_timer(int pti, const OctetString *msg, ...@@ -315,7 +316,6 @@ int esm_pt_start_timer(int pti, const OctetString *msg,
* time interval */ * time interval */
ctx->timer.id = nas_timer_start(sec, cb, ctx->args); ctx->timer.id = nas_timer_start(sec, cb, ctx->args);
ctx->timer.sec = sec; ctx->timer.sec = sec;
// FIXME add user
} }
} }
......
...@@ -93,7 +93,7 @@ void esm_pt_initialize(void); ...@@ -93,7 +93,7 @@ void esm_pt_initialize(void);
int esm_pt_assign(void); int esm_pt_assign(void);
int esm_pt_release(int pti); 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); nas_timer_callback_t cb);
int esm_pt_stop_timer(int pti); int esm_pt_stop_timer(int pti);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment