VOL-555 - Support Deletion of an ONU using the XPON configuration Interface in
ASFvOLT16 and Broadcom ONU adapter
Change-Id: Id313a519aae9637094d97fb92755a7000b1557c3
diff --git a/device_simulator/voltha_bal_driver.c b/device_simulator/voltha_bal_driver.c
index a645978..60e3981 100755
--- a/device_simulator/voltha_bal_driver.c
+++ b/device_simulator/voltha_bal_driver.c
@@ -366,6 +366,8 @@
void bal__bal_cfg_clear_cb(grpc_c_context_t *context)
{
BalKey *clear_key;
+ BalErr bal_err;
+ int ret_val = 0;
/*
* Read incoming message into clear_key
@@ -374,6 +376,32 @@
context->gcc_stream->read(context, (void **)&clear_key, 0);
}
+ /*
+ * send it to BAL
+ */
+
+ bal_err__init(&bal_err);
+
+ bal_err.err= 0;
+
+ /*
+ * Write reply back to the client
+ */
+
+ ret_val = context->gcc_stream->write(context, &bal_err, 0);
+ is_grpc_write_pending(ret_val);
+
+ grpc_c_status_t status;
+ status.gcs_code = 0;
+
+ /*
+ * Finish response for RPC
+ */
+ if (context->gcc_stream->finish(context, &status))
+ {
+ ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
+ }
+
#ifndef BAL_STUB
asfvolt16_bal_cfg_clear(clear_key);
#endif
diff --git a/src/bal_subscriber_terminal_hdlr.c b/src/bal_subscriber_terminal_hdlr.c
index c2df2a6..cb840de 100755
--- a/src/bal_subscriber_terminal_hdlr.c
+++ b/src/bal_subscriber_terminal_hdlr.c
@@ -107,7 +107,7 @@
}
ASFVOLT_CFG_PROP_SET(sub_term_obj, subscriber_terminal, admin_state,
- BCMOS_TRUE, BCMBAL_STATE_UP);
+ BCMOS_TRUE, onu_cfg->data->admin_state);
if (!skip_onu)
{