dsmcc-carousel.c

来自「Parses UK Profile 1.05/1.06 Object Carou」· C语言 代码 · 共 71 行

C
71 行
字号
#include <stdlib.h>#include "dsmcc-receiver.h"#include "dsmcc-descriptor.h"#include "dsmcc-carousel.h"ObjCarousel::ObjCarousel(void) {}ObjCarousel::~ObjCarousel(void) {	struct stream *str, *strnext;	struct cache_module_data *cachep, *cachepnext;	struct descriptor *desc, *last;	/* Free gateway info */	if(gate != NULL) {	      if(gate->user_data_len > 0)		free(gate->user_data);	      if(gate->profile.type_id_len > 0)	        free(gate->profile.type_id);	      if(gate->profile.body.full.obj_loc.objkey_len>0)		free(gate->profile.body.full.obj_loc.objkey);	      if(gate->profile.body.full.dsm_conn.taps_count>0) {	       if(gate->profile.body.full.dsm_conn.tap.selector_len>0)		 free(gate->profile.body.full.dsm_conn.tap.selector_data);	      }	}	/* Free stream info */	str = streams;	while(str!=NULL) {	     strnext = str->next;	     free(str);	     str = strnext;	}	streams = NULL;	/* Free cache info */	cachep = cache;	while(cachep!=NULL) {	      cachepnext = cachep->next;	      if(cachep->data != NULL) { /* should be empty */		      free(cachep->data);	      }	      if(cachep->bstatus != NULL) {		      free(cachep->bstatus);	      }	      if(cachep->descriptors != NULL) { /* TODO badness */                desc = cachep->descriptors;                while(desc != NULL) {                  last = desc->next;                  FreeDescriptor(desc);                  desc = last;                }	      }	      free(cachep);	      cachep = cachepnext;	}	delete filecache;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?