- pcrs_execute(job, old, size, &new, &size);
- if (old != buf) free(old);
- old = new;
+ /* Enclose name in @@ */
+ snprintf(buf, BUFFER_SIZE, "@%s@", m->name);
+
+ /* Make and run job */
+ if ( NULL == (job = (pcrs_compile(buf, m->value, "sigTU", &error))) )
+ {
+ log_error(LOG_LEVEL_ERROR, "Error compiling template fill job %s: %d", m->name, error);
+ }
+ else
+ {
+ pcrs_execute(job, file_buffer, size, &tmp_out_buffer, &size);
+ if (file_buffer != tmp_out_buffer)
+ {
+ free(file_buffer);
+ file_buffer = tmp_out_buffer;
+ }
+ pcrs_free_job(job);
+ }