64 for (i = 0; i < g -> nvalues; i++) {
81 if (status != ISC_R_SUCCESS)
90 (&(g -> values [i]),
new,
MDL));
96 else if (vfree == -1 && !g -> values [i])
102 if (h -> inner && h -> inner -> type -> set_value) {
103 status = ((*(h -> inner -> type -> set_value))
104 (h -> inner, id, name, value));
105 if (status != ISC_R_NOTFOUND)
118 vfree = g -> nvalues;
119 if (vfree == g -> va_max) {
121 vm_new = 2 * g -> va_max;
126 return ISC_R_NOMEMORY;
130 return ISC_R_NOMEMORY;
133 memcpy (va, g -> values,
134 g -> va_max *
sizeof *va);
135 memcpy (ca, g -> changed,
136 g -> va_max *
sizeof *ca);
138 memset (va + g -> va_max, 0,
139 (vm_new - g -> va_max) *
sizeof *va);
140 memset (ca + g -> va_max, 0,
141 (vm_new - g -> va_max) *
sizeof *ca);
148 g -> va_max = vm_new;
152 if (status != ISC_R_SUCCESS)
158 (&g -> values [vfree] -> value, value,
MDL);
159 g -> changed [vfree] = 1;
160 if (vfree == g -> nvalues)
162 return ISC_R_SUCCESS;
178 for (i = 0; i < g -> nvalues; i++) {
185 if (!g -> values [i] -> value)
186 return ISC_R_NOTFOUND;
189 g -> values [i],
MDL);
193 if (h -> inner && h -> inner -> type -> get_value)
194 return (*(h -> inner -> type -> get_value))
195 (h -> inner, id, name, value);
196 return ISC_R_NOTFOUND;
206 return ISC_R_UNEXPECTED;
210 for (i = 0; i < g -> nvalues; i++) {
215 dfree (g -> values, file, line);
216 dfree (g -> changed, file, line);
218 g -> changed = (u_int8_t *)0;
222 return ISC_R_SUCCESS;
226 const char *name, va_list ap)
231 if (h -> inner && h -> inner -> type -> signal_handler)
232 return (*(h -> inner -> type -> signal_handler)) (h -> inner,
234 return ISC_R_NOTFOUND;
252 for (i = 0; i < src -> nvalues; i++) {
253 if (src -> values [i] && src -> values [i] -> name -> len &&
254 src -> changed [i]) {
256 (c, src -> values [i] -> name -> len));
257 if (status != ISC_R_SUCCESS)
260 (c, src -> values [i] -> name -> value,
261 src -> values [i] -> name -> len));
262 if (status != ISC_R_SUCCESS)
266 (c, src -> values [i] -> value));
267 if (status != ISC_R_SUCCESS)
272 if (g -> inner && g -> inner -> type -> stuff_values)
273 return (*(g -> inner -> type -> stuff_values)) (c,
id,
275 return ISC_R_SUCCESS;
292 for (i = 0; i < g -> nvalues; i++) {
293 g -> changed [i] = 0;
294 if (g -> values [i] &&
295 !g -> values [i] -> value)
298 return ISC_R_SUCCESS;
isc_result_t omapi_value_reference(omapi_value_t **, omapi_value_t *, const char *, int)
isc_result_t omapi_generic_clear_flags(omapi_object_t *o)
void * dmalloc(unsigned, const char *, int)
isc_result_t omapi_connection_copyin(omapi_object_t *, const unsigned char *, unsigned)
#define DHCP_R_INVALIDARG
int omapi_data_string_cmp(omapi_data_string_t *, omapi_data_string_t *)
isc_result_t omapi_data_string_reference(omapi_data_string_t **, omapi_data_string_t *, const char *, int)
isc_result_t omapi_value_new(omapi_value_t **, const char *, int)
isc_result_t omapi_connection_write_typed_data(omapi_object_t *, omapi_typed_data_t *)
isc_result_t omapi_generic_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
isc_result_t omapi_generic_new(omapi_object_t **, const char *, int)
void dfree(void *, const char *, int)
OMAPI_OBJECT_ALLOC(omapi_generic, omapi_generic_object_t, omapi_type_generic)
isc_result_t omapi_typed_data_reference(omapi_typed_data_t **, omapi_typed_data_t *, const char *, int)
isc_result_t omapi_value_dereference(omapi_value_t **, const char *, int)
omapi_object_type_t * omapi_type_generic
isc_result_t omapi_generic_signal_handler(omapi_object_t *h, const char *name, va_list ap)
isc_result_t omapi_connection_put_uint16(omapi_object_t *, u_int32_t)
isc_result_t omapi_generic_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t omapi_generic_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *g)
isc_result_t omapi_generic_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)