returing proper status from megaco_context_add_termination API

This commit is contained in:
Kapil 2012-08-17 16:10:05 -04:00
parent 263dc459a8
commit 3eba8a7940
1 changed files with 6 additions and 4 deletions

View File

@ -435,14 +435,16 @@ switch_status_t megaco_context_add_termination(mg_context_t *ctx, mg_termination
if (ctx->terminations[0] && ctx->terminations[1]) {
if (zstr(ctx->terminations[0]->uuid)) {
status = megaco_activate_termination(ctx->terminations[0]);
if(SWITCH_STATUS_SUCCESS != (status = megaco_activate_termination(ctx->terminations[0]))){
return status;
}
}
if (zstr(ctx->terminations[1]->uuid)) {
status = megaco_activate_termination(ctx->terminations[1]);
if(SWITCH_STATUS_SUCCESS != (status = megaco_activate_termination(ctx->terminations[1]))){
return status;
}
}
if(SWITCH_STATUS_SUCCESS != status) return status;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Bridging: %s (%s) <> %s (%s)\n",
ctx->terminations[0]->name, ctx->terminations[0]->uuid,
ctx->terminations[1]->name, ctx->terminations[1]->uuid);