cc: add missing parameters to CC primitives
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
68c796f587
commit
4ff96238d5
|
@ -44,6 +44,7 @@ static void mncc_setup_ack_ind(struct dect_handle *dh, struct dect_call *call,
|
|||
}
|
||||
|
||||
static void mncc_reject_ind(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param)
|
||||
{
|
||||
}
|
||||
|
@ -74,6 +75,7 @@ static void mncc_release_ind(struct dect_handle *dh, struct dect_call *call,
|
|||
}
|
||||
|
||||
static void mncc_release_cfm(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param)
|
||||
{
|
||||
}
|
||||
|
@ -94,7 +96,7 @@ static void mncc_modify_ind(struct dect_handle *dh, struct dect_call *call,
|
|||
}
|
||||
|
||||
static void mncc_modify_cfm(struct dect_handle *dh, struct dect_call *call,
|
||||
struct dect_mncc_modify_param *param)
|
||||
bool success, struct dect_mncc_modify_param *param)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -151,6 +151,7 @@ static void dect_mncc_alert_ind(struct dect_handle *dh, struct dect_call *call,
|
|||
}
|
||||
|
||||
static void dect_mncc_reject_ind(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param)
|
||||
{
|
||||
struct call *priv = dect_call_priv(call);
|
||||
|
|
|
@ -20,6 +20,7 @@ struct call {
|
|||
};
|
||||
|
||||
static void dect_mncc_reject_ind(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param)
|
||||
{
|
||||
dect_event_loop_stop();
|
||||
|
|
|
@ -195,6 +195,16 @@ struct dect_mncc_iwu_info_param {
|
|||
struct dect_ie_escape_to_proprietary *escape_to_proprietary;
|
||||
};
|
||||
|
||||
/**
|
||||
* Call release/rejection causes used by the @ref dect_cc_ops::mncc_release_cfm
|
||||
* "MNCC_RELEASE-cfm" and @ref dect_cc_ops::mncc_reject_ind "MNCC_REJECT-ind"
|
||||
* primitives.
|
||||
*/
|
||||
enum dect_causes {
|
||||
DECT_CAUSE_LOCAL_TIMER_EXPIRY, /**< a local timer has expired */
|
||||
DECT_CAUSE_PEER_MESSAGE, /**< a valid peer message was received */
|
||||
};
|
||||
|
||||
struct dect_handle;
|
||||
struct dect_call;
|
||||
struct dect_msg_buf;
|
||||
|
@ -220,6 +230,7 @@ struct dect_cc_ops {
|
|||
struct dect_mncc_setup_ack_param *param);
|
||||
/**< MNCC_SETUP_ACK-ind primitive */
|
||||
void (*mncc_reject_ind)(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param);
|
||||
/**< MNCC_REJECT-ind primitive */
|
||||
void (*mncc_call_proc_ind)(struct dect_handle *dh, struct dect_call *call,
|
||||
|
@ -238,6 +249,7 @@ struct dect_cc_ops {
|
|||
struct dect_mncc_release_param *param);
|
||||
/**< MNCC_RELEASE-ind primitive */
|
||||
void (*mncc_release_cfm)(struct dect_handle *dh, struct dect_call *call,
|
||||
enum dect_causes cause,
|
||||
struct dect_mncc_release_param *param);
|
||||
/**< MNCC_RELEASE-cfm primitive */
|
||||
void (*mncc_facility_ind)(struct dect_handle *dh, struct dect_call *call,
|
||||
|
@ -250,7 +262,7 @@ struct dect_cc_ops {
|
|||
struct dect_mncc_modify_param *param);
|
||||
/**< MNCC_MODIFY-ind primtiive */
|
||||
void (*mncc_modify_cfm)(struct dect_handle *dh, struct dect_call *call,
|
||||
struct dect_mncc_modify_param *param);
|
||||
bool success, struct dect_mncc_modify_param *param);
|
||||
/**< MNCC_MODIFY-cfm primitive */
|
||||
void (*mncc_hold_ind)(struct dect_handle *dh, struct dect_call *call,
|
||||
struct dect_mncc_hold_param *param);
|
||||
|
@ -299,7 +311,7 @@ extern int dect_mncc_info_req(struct dect_handle *dh, struct dect_call *call,
|
|||
extern int dect_mncc_modify_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_modify_param *param);
|
||||
extern int dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_modify_param *param);
|
||||
bool success, const struct dect_mncc_modify_param *param);
|
||||
extern int dect_mncc_hold_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_hold_param *param);
|
||||
extern int dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call,
|
||||
|
|
25
src/cc.c
25
src/cc.c
|
@ -569,20 +569,13 @@ static void dect_cc_send_release_com(struct dect_handle *dh,
|
|||
static void dect_cc_setup_timer(struct dect_handle *dh, struct dect_timer *timer)
|
||||
{
|
||||
struct dect_call *call = timer->data;
|
||||
struct dect_mncc_release_param *param;
|
||||
|
||||
cc_debug(call, "setup timer");
|
||||
dect_cc_send_release_com(dh, &call->transaction,
|
||||
DECT_RELEASE_TIMER_EXPIRY);
|
||||
|
||||
param = dect_ie_collection_alloc(dh, sizeof(*param));
|
||||
if (param == NULL)
|
||||
goto out;
|
||||
dect_cc_send_release_com(dh, &call->transaction, DECT_RELEASE_TIMER_EXPIRY);
|
||||
|
||||
cc_debug(call, "MNCC_REJECT-ind");
|
||||
dh->ops->cc_ops->mncc_reject_ind(dh, call, param);
|
||||
dect_ie_collection_put(dh, param);
|
||||
out:
|
||||
dh->ops->cc_ops->mncc_reject_ind(dh, call, DECT_CAUSE_LOCAL_TIMER_EXPIRY, NULL);
|
||||
|
||||
dect_transaction_close(dh, &call->transaction, DECT_DDL_RELEASE_NORMAL);
|
||||
dect_call_destroy(dh, call);
|
||||
}
|
||||
|
@ -1015,12 +1008,13 @@ EXPORT_SYMBOL(dect_mncc_modify_req);
|
|||
*
|
||||
* @param dh libdect DECT handle
|
||||
* @param call Call Control Endpoint
|
||||
* @param success success/failure of service modification
|
||||
* @param param call modification parameters
|
||||
*/
|
||||
int dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_modify_param *param)
|
||||
bool success, const struct dect_mncc_modify_param *param)
|
||||
{
|
||||
cc_debug_entry(call, "MNCC_MODIFY-res");
|
||||
cc_debug_entry(call, "MNCC_MODIFY-res: success: %u", success);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_modify_res);
|
||||
|
@ -1375,7 +1369,7 @@ static void dect_mncc_release_cfm(struct dect_handle *dh, struct dect_call *call
|
|||
param->escape_to_proprietary = dect_ie_hold(msg->escape_to_proprietary);
|
||||
|
||||
cc_debug(call, "MNCC_RELEASE-cfm");
|
||||
dh->ops->cc_ops->mncc_release_cfm(dh, call, param);
|
||||
dh->ops->cc_ops->mncc_release_cfm(dh, call, DECT_CAUSE_PEER_MESSAGE, param);
|
||||
dect_ie_collection_put(dh, param);
|
||||
|
||||
dect_call_shutdown(dh, call);
|
||||
|
@ -1647,16 +1641,15 @@ static void dect_cc_shutdown(struct dect_handle *dh,
|
|||
struct dect_transaction *ta)
|
||||
{
|
||||
struct dect_call *call = container_of(ta, struct dect_call, transaction);
|
||||
struct dect_mncc_release_param param = {};
|
||||
|
||||
cc_debug(call, "shutdown");
|
||||
|
||||
if (call->state == DECT_CC_RELEASE_PENDING) {
|
||||
cc_debug(call, "MNCC_RELEASE-cfm");
|
||||
dh->ops->cc_ops->mncc_release_cfm(dh, call, ¶m);
|
||||
dh->ops->cc_ops->mncc_release_cfm(dh, call, DECT_CAUSE_LOCAL_TIMER_EXPIRY, NULL);
|
||||
} else {
|
||||
cc_debug(call, "MNCC_REJECT-ind");
|
||||
dh->ops->cc_ops->mncc_reject_ind(dh, call, ¶m);
|
||||
dh->ops->cc_ops->mncc_reject_ind(dh, call, DECT_CAUSE_LOCAL_TIMER_EXPIRY, NULL);
|
||||
}
|
||||
|
||||
dect_call_shutdown(dh, call);
|
||||
|
|
Reference in New Issue