aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/hdf5-file.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-03 15:10:54 +0100
committerThomas White <taw@physics.org>2014-03-03 15:15:19 +0100
commit8a15866307f7dde7ba70ed9de756cf0392904e30 (patch)
tree1bd774d302a7d50a2fb962aa0ae7f07faf0939ee /libcrystfel/src/hdf5-file.c
parent425c6c1c4ee91785f546f8cefc020e5dc577cad7 (diff)
Add things to stream if they were mentioned in beam or geom, and remove clen_ entries
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-rw-r--r--libcrystfel/src/hdf5-file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index ed3b1e29..08e1c5e3 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -883,6 +883,13 @@ void free_copy_hdf5_field_list(struct copy_hdf5_field *n)
void add_copy_hdf5_field(struct copy_hdf5_field *copyme,
const char *name)
{
+ int i;
+
+ /* Already on the list? Don't re-add if so. */
+ for ( i=0; i<copyme->n_fields; i++ ) {
+ if ( strcmp(copyme->fields[i], name) == 0 ) return;
+ }
+
/* Need more space? */
if ( copyme->n_fields == copyme->max_fields ) {