From f5b3fafa479707eab35fe76f59ec1d5873264a00 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 24 Feb 2011 21:47:07 +0100 Subject: cc: convert -res primitives to return void There is no reasonable way for the caller to respond to an error returned by a -res primitive, the initiator is responsible for resending the request. Change all CC -res primitives to return void. Signed-off-by: Patrick McHardy --- include/dect/cc.h | 20 ++++++++++---------- src/cc.c | 28 +++++++++++----------------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/include/dect/cc.h b/include/dect/cc.h index 4f114ec..ffa25ab 100644 --- a/include/dect/cc.h +++ b/include/dect/cc.h @@ -298,28 +298,28 @@ extern int dect_mncc_alert_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_alert_param *param); extern int dect_mncc_connect_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_connect_param *param); -extern int dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_connect_param *param); +extern void dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_connect_param *param); extern int dect_mncc_release_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_release_param *param); -extern int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_release_param *param); +extern void dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_release_param *param); extern int dect_mncc_facility_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_facility_param *param); extern int dect_mncc_info_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_info_param *param); 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, - bool success, const struct dect_mncc_modify_param *param); +extern void dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call, + 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, - const struct dect_mncc_hold_param *param); +extern void dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_hold_param *param); extern int dect_mncc_retrieve_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_hold_param *param); -extern int dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_hold_param *param); +extern void dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_hold_param *param); extern int dect_mncc_iwu_info_req(struct dect_handle *dh, struct dect_call *call, const struct dect_mncc_iwu_info_param *param); diff --git a/src/cc.c b/src/cc.c index 93e27e5..3c3281a 100644 --- a/src/cc.c +++ b/src/cc.c @@ -1043,8 +1043,8 @@ EXPORT_SYMBOL(dect_mncc_connect_req); * @param call Call Control Endpoint * @param param call connection parameters */ -int dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_connect_param *param) +void dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_connect_param *param) { struct dect_cc_connect_ack_msg msg = { .display = param->display, @@ -1061,12 +1061,10 @@ int dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call, goto err1; call->state = DECT_CC_ACTIVE; - - return 0; + return; err1: dect_call_disconnect_uplane(dh, call); - return -1; } EXPORT_SYMBOL(dect_mncc_connect_res); @@ -1111,8 +1109,8 @@ EXPORT_SYMBOL(dect_mncc_release_req); * @param call Call Control Endpoint * @param param call release parameters */ -int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_release_param *param) +void dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_release_param *param) { struct dect_cc_release_com_msg msg = { .release_reason = param->release_reason, @@ -1134,7 +1132,6 @@ int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call, dect_cc_stop_timers(dh, call); dect_call_shutdown(dh, call); - return 0; } EXPORT_SYMBOL(dect_mncc_release_res); @@ -1218,11 +1215,10 @@ EXPORT_SYMBOL(dect_mncc_modify_req); * @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, - bool success, const struct dect_mncc_modify_param *param) +void dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call, + bool success, const struct dect_mncc_modify_param *param) { cc_debug_entry(call, "MNCC_MODIFY-res: success: %u", success); - return 0; } EXPORT_SYMBOL(dect_mncc_modify_res); @@ -1254,11 +1250,10 @@ EXPORT_SYMBOL(dect_mncc_hold_req); * @param call Call Control Endpoint * @param param call hold parameters */ -int dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_hold_param *param) +void dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_hold_param *param) { cc_debug_entry(call, "MNCC_HOLD-res"); - return 0; } EXPORT_SYMBOL(dect_mncc_hold_res); @@ -1284,11 +1279,10 @@ EXPORT_SYMBOL(dect_mncc_retrieve_req); * @param call Call Control Endpoint * @param param call retrieve parameters */ -int dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call, - const struct dect_mncc_hold_param *param) +void dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call, + const struct dect_mncc_hold_param *param) { cc_debug_entry(call, "MNCC_RETRIEVE-res"); - return 0; } EXPORT_SYMBOL(dect_mncc_retrieve_res); -- cgit v1.2.3