Lines Matching defs:batch
223 am_status_t(*callback)(const char *openam, int count, struct am_audit_transfer *batch)) {
230 struct am_audit_transfer *batch;
232 batch = malloc(BATCH_SIZE * sizeof (struct am_audit_transfer));
233 if (batch == NULL) {
239 AM_FREE(batch);
245 AM_FREE(batch);
251 batch[c].message = strdup(e->value);
252 batch[c].instance_id = e->instance_id;
253 batch[c].server_id = strdup(e->server_id);
254 batch[c].config_file = strdup(config->config_file);
260 callback(config->openam, c, batch);
262 AM_FREE(batch[i].message, batch[i].server_id, batch[i].config_file);
273 callback(config->openam, c, batch);
275 AM_FREE(batch[i].message, batch[i].server_id, batch[i].config_file);
281 AM_FREE(batch);
285 static am_status_t write_entries_to_server(const char *openam, int count, struct am_audit_transfer *batch) {
292 if (count == 0 || batch == NULL || ISINVALID(openam)) {
303 server_id = batch[i].server_id;
304 instance_id = batch[i].instance_id;
305 config_file = batch[i].config_file;
306 msg_size = am_asprintf(&msg, batch[i].message, i + 1, "");
308 msg_size = am_asprintf(&msg, batch[i].message, i + 1, msg);