TR181-XPON  1.4.0
TR-181 PON manager.
onu_priv.c File Reference
#include "onu_priv.h"
#include <stdlib.h>
#include "xpon_trace.h"

Go to the source code of this file.

Functions

void onu_priv_attach_private_data (amxd_object_t *const object)
 
void onu_priv_delete_private_data (onu_priv_t *priv)
 

Function Documentation

◆ onu_priv_attach_private_data()

void onu_priv_attach_private_data ( amxd_object_t *const  object)

Attach private data to the ONU instance.

Parameters
[in]objectthe ONU instance

Definition at line 77 of file onu_priv.c.

77  {
78  when_null_trace(object, exit, ERROR, "object is NULL");
79  when_not_null_trace(object->priv, exit, ERROR, "object has already priv data");
80 
81  onu_priv_t* const priv = calloc(1, sizeof(onu_priv_t));
82  when_null_trace(priv, exit, ERROR, "Failed to create onu_priv_t");
83  object->priv = priv;
84 
85 exit:
86  return;
87 }
Here is the caller graph for this function:

◆ onu_priv_delete_private_data()

void onu_priv_delete_private_data ( onu_priv_t priv)

Definition at line 89 of file onu_priv.c.

89  {
90  if(priv) {
91  free(priv);
92  }
93 }
Here is the caller graph for this function: