Skip to content

Commit

Permalink
smax-postgres: sync to SMA-Software repo
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Oct 2, 2024
1 parent 07df16c commit de4339c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/postgres-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,11 @@ static char *appendValues(const Variable *u, char *dst) {
}

f = &u->field;
if(!f->value) {
errno = EINVAL;
return dst;
}

eSize = xElementSizeOf(f->type);

if(u->sampling > 1) step = u->sampling;
Expand Down
9 changes: 7 additions & 2 deletions src/smax-collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,14 @@ static boolean SubmitUpdate(Update *u) {
}

v = u->var;
m = &u->meta;
f = &v->field;

if(!f->value) {
errno = EINVAL;
return FALSE;
}

m = &u->meta;
if(m->storeType == X_STRUCT) return FALSE;

p = getLogProperties(v->id);
Expand All @@ -206,7 +212,6 @@ static boolean SubmitUpdate(Update *u) {
force = p->force;
}

f = &v->field;
f->isSerialized = TRUE;
f->type = m->storeType;
f->ndim = m->storeDim;
Expand Down

0 comments on commit de4339c

Please sign in to comment.