struct rspamd_rcl_struct_parser *pd = ud;
union {
gint *psec;
+ guint32 *pu32;
gdouble *pdv;
struct timeval *ptv;
struct timespec *pts;
target.psec = (gint *)(((gchar *)pd->user_struct) + pd->offset);
*target.psec = val * 1000;
}
+ else if (pd->flags == RSPAMD_CL_FLAG_TIME_UINT_32) {
+ target.pu32 = (guint32 *)(((gchar *)pd->user_struct) + pd->offset);
+ *target.pu32 = val * 1000;
+ }
else {
g_set_error (err, CFG_RCL_ERROR, EINVAL, "invalid flags to parse time value");
return FALSE;
RSPAMD_CL_FLAG_TIME_TIMEVAL = 0x1 << 1,
RSPAMD_CL_FLAG_TIME_TIMESPEC = 0x1 << 2,
RSPAMD_CL_FLAG_TIME_INTEGER = 0x1 << 3,
- RSPAMD_CL_FLAG_INT_16 = 0x1 << 4,
- RSPAMD_CL_FLAG_INT_32 = 0x1 << 5,
- RSPAMD_CL_FLAG_INT_64 = 0x1 << 6,
- RSPAMD_CL_FLAG_INT_SIZE = 0x1 << 7
+ RSPAMD_CL_FLAG_TIME_UINT_32 = 0x1 << 4,
+ RSPAMD_CL_FLAG_INT_16 = 0x1 << 5,
+ RSPAMD_CL_FLAG_INT_32 = 0x1 << 6,
+ RSPAMD_CL_FLAG_INT_64 = 0x1 << 7,
+ RSPAMD_CL_FLAG_INT_SIZE = 0x1 << 8
} flags;
};