33 |
static void _gcpcl(Checksum_T*); |
static void _gcpcl(Checksum_T*); |
34 |
static void _gcpql(Resource_T*); |
static void _gcpql(Resource_T*); |
35 |
static void _gcppil(ProcInfo_T*); |
static void _gcppil(ProcInfo_T*); |
|
static void _gcpdil(DeviceInfo_T*); |
|
36 |
static void _gcptl(Timestamp_T*); |
static void _gcptl(Timestamp_T*); |
37 |
|
static void _gccmd(Command_T *c); |
38 |
|
static void _gcpdil(DeviceInfo_T*); |
39 |
static void _gcpdl(Dependant_T *d); |
static void _gcpdl(Dependant_T *d); |
40 |
|
|
41 |
|
|
65 |
|
|
66 |
void gc_service(Service_T *s) { |
void gc_service(Service_T *s) { |
67 |
|
|
|
int i; |
|
|
|
|
68 |
ASSERT(s&&*s); |
ASSERT(s&&*s); |
69 |
|
|
70 |
if((*s)->portlist) { |
if((*s)->portlist) { |
120 |
free((*s)->group); |
free((*s)->group); |
121 |
|
|
122 |
if((*s)->start) { |
if((*s)->start) { |
123 |
for(i= 0; (*s)->start->arg[i]; i++) |
_gccmd(&(*s)->start); |
|
free((*s)->start->arg[i]); |
|
|
free((*s)->start); |
|
124 |
} |
} |
125 |
|
|
126 |
if((*s)->stop) { |
if((*s)->stop) { |
127 |
for(i= 0; (*s)->stop->arg[i]; i++) |
_gccmd(&(*s)->stop); |
|
free((*s)->stop->arg[i]); |
|
|
free((*s)->stop); |
|
128 |
} |
} |
129 |
|
|
130 |
(*s)->next= NULL; |
(*s)->next= NULL; |
174 |
} |
} |
175 |
|
|
176 |
|
|
177 |
|
static void _gccmd(Command_T *c) { |
178 |
|
|
179 |
|
int i; |
180 |
|
|
181 |
|
ASSERT(c&&*c); |
182 |
|
|
183 |
|
for(i= 0; (*c)->arg[i]; i++) |
184 |
|
free((*c)->arg[i]); |
185 |
|
free(*c); |
186 |
|
*c= NULL; |
187 |
|
|
188 |
|
} |
189 |
|
|
190 |
|
|
191 |
|
|
192 |
static void _gcppl(Port_T *s) { |
static void _gcppl(Port_T *s) { |
193 |
|
|
194 |
ASSERT(s&&*s); |
ASSERT(s&&*s); |
239 |
_gcpql(&(*q)->next); |
_gcpql(&(*q)->next); |
240 |
|
|
241 |
} |
} |
242 |
|
|
243 |
|
if((*q)->exec) { |
244 |
|
_gccmd(&(*q)->exec); |
245 |
|
} |
246 |
|
|
247 |
free(*q); |
free(*q); |
248 |
*q= NULL; |
*q= NULL; |
281 |
} |
} |
282 |
|
|
283 |
free((*p)->pathname); |
free((*p)->pathname); |
284 |
|
if((*p)->exec) { |
285 |
|
_gccmd(&(*p)->exec); |
286 |
|
} |
287 |
free(*p); |
free(*p); |
288 |
*p= NULL; |
*p= NULL; |
289 |
|
|