aboutsummaryrefslogtreecommitdiffstats
path: root/src/sm-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sm-helper.c')
-rw-r--r--src/sm-helper.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/sm-helper.c b/src/sm-helper.c
index 0ccd1c7..c55eefb 100644
--- a/src/sm-helper.c
+++ b/src/sm-helper.c
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
#include "sm-helper.h"
-#include "sm-def.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
@@ -187,20 +185,21 @@ int sm_search_routing_event_name_index(const char* value)
return ret;
}
-bool send_result(const GError* result_of_send, struct afb_req req, const char* function){
+bool send_result(ErrorCode ec, struct afb_req req, const char* function){
/* GError = NULL means success in case of gdbus request */
- if(result_of_send != NULL)
+ if(ec == UNABLE_SEND)
{
- AFB_ERROR("Unable to call %s", function);
- afb_req_fail_f(req, "failed", "Unable to call %s", function);
+ AFB_ERROR("Unable to call : %s", function);
+ afb_req_fail_f(req, "failed", "%s : %s",
+ get_response_audiomanager_massage_error(ec), function);
return false;
}
return true;
}
-bool send_result_no_resp(const GError* result_of_send, const char* function){
- if(result_of_send != NULL){
- AFB_ERROR("Unable to call %s", function);
+bool send_result_no_resp(ErrorCode ec, const char* function){
+ if(ec == UNABLE_SEND){
+ AFB_ERROR("Unable to call : %s", function);
return false;
}
return true;