UE/EMM: add nas_user_t parameter to emm_sap_send

Surprisingly, it touches every part of openair3, and most of the prototype.
Moreover, a special attention have been put to callback review.
However, there are still places to fix or review indicated by FIXME
This commit is contained in:
Frédéric Leroy
2017-01-25 13:08:19 +01:00
parent 4742178aee
commit 223247ceb0
46 changed files with 380 additions and 349 deletions
+11 -11
View File
@@ -96,7 +96,7 @@ static struct {
** Others: None **
** **
***************************************************************************/
int lowerlayer_success(unsigned int ueid)
int lowerlayer_success(nas_user_t *user, unsigned int ueid)
{
LOG_FUNC_IN;
@@ -105,7 +105,7 @@ int lowerlayer_success(unsigned int ueid)
emm_sap.primitive = EMMREG_LOWERLAYER_SUCCESS;
emm_sap.u.emm_reg.ueid = ueid;
rc = emm_sap_send(&emm_sap);
rc = emm_sap_send(user, &emm_sap);
LOG_FUNC_RETURN (rc);
}
@@ -125,7 +125,7 @@ int lowerlayer_success(unsigned int ueid)
** Others: None **
** **
***************************************************************************/
int lowerlayer_failure(unsigned int ueid)
int lowerlayer_failure(nas_user_t *user, unsigned int ueid)
{
LOG_FUNC_IN;
@@ -134,7 +134,7 @@ int lowerlayer_failure(unsigned int ueid)
emm_sap.primitive = EMMREG_LOWERLAYER_FAILURE;
emm_sap.u.emm_reg.ueid = ueid;
rc = emm_sap_send(&emm_sap);
rc = emm_sap_send(user, &emm_sap);
LOG_FUNC_RETURN (rc);
}
@@ -155,7 +155,7 @@ int lowerlayer_failure(unsigned int ueid)
** Others: None **
** **
***************************************************************************/
int lowerlayer_establish(void)
int lowerlayer_establish(nas_user_t *user)
{
LOG_FUNC_IN;
@@ -180,7 +180,7 @@ int lowerlayer_establish(void)
** Others: None **
** **
***************************************************************************/
int lowerlayer_release(int cause)
int lowerlayer_release(nas_user_t *user, int cause)
{
LOG_FUNC_IN;
@@ -192,7 +192,7 @@ int lowerlayer_release(int cause)
emm_sap.primitive = EMMREG_LOWERLAYER_RELEASE;
emm_sap.u.emm_reg.ueid = 0;
rc = emm_sap_send(&emm_sap);
rc = emm_sap_send(user, &emm_sap);
LOG_FUNC_RETURN (rc);
}
@@ -213,7 +213,7 @@ int lowerlayer_release(int cause)
** Others: None **
** **
***************************************************************************/
int lowerlayer_data_ind(unsigned int ueid, const OctetString *data)
int lowerlayer_data_ind(nas_user_t *user, unsigned int ueid, const OctetString *data)
{
esm_sap_t esm_sap;
int rc;
@@ -226,7 +226,7 @@ int lowerlayer_data_ind(unsigned int ueid, const OctetString *data)
esm_sap.ueid = ueid;
esm_sap.recv = data;
rc = esm_sap_send(&esm_sap);
rc = esm_sap_send(user, &esm_sap);
LOG_FUNC_RETURN (rc);
}
@@ -247,7 +247,7 @@ int lowerlayer_data_ind(unsigned int ueid, const OctetString *data)
** Others: None **
** **
***************************************************************************/
int lowerlayer_data_req(unsigned int ueid, const OctetString *data)
int lowerlayer_data_req(nas_user_t *user, unsigned int ueid, const OctetString *data)
{
LOG_FUNC_IN;
@@ -266,7 +266,7 @@ int lowerlayer_data_req(unsigned int ueid, const OctetString *data)
emm_sap.u.emm_as.u.data.NASmsg.value = data->value;
/* Setup EPS NAS security data */
emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx, sctx, FALSE, TRUE);
rc = emm_sap_send(&emm_sap);
rc = emm_sap_send(user, &emm_sap);
LOG_FUNC_RETURN (rc);
}