Changeset 2664:e92e6a804a95 in roaraudio
- Timestamp:
- 09/12/09 22:10:07 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/container_framework.c
r2663 r2664 36 36 37 37 int cont_fw_new (struct cont_fw_parent_inst ** inst) { 38 return -1; 38 struct cont_fw_parent_inst * self; 39 40 if ( inst == NULL ) 41 return -1; 42 43 if ( (self = malloc(sizeof(struct cont_fw_parent_inst))) == NULL ) { 44 *inst = NULL; 45 return -1; 46 } 47 48 memset(self, 0, sizeof(struct cont_fw_parent_inst)); 49 50 *inst = self; 51 return 0; 39 52 } 40 53 41 54 int cont_fw_delete (struct cont_fw_parent_inst * inst) { 42 return -1; 55 int i; 56 57 if ( inst == NULL ) 58 return -1; 59 60 // check if there are streams to close... 61 for (i = 0; i < CONT_FW_MAX_CHILDS; i++) { 62 if ( inst->child[i] != NULL ) { 63 return -1; 64 } 65 } 66 67 free(inst); 68 69 return 0; 43 70 } 44 71
Note: See TracChangeset
for help on using the changeset viewer.