}
/* Prepares a stktable_key from a sample <smp> to search into table <t>.
+ * Note that the sample *is* modified and that the returned key may point
+ * to it, so the sample must not be modified afterwards before the lookup.
* Returns NULL if the sample could not be converted (eg: no matching type),
* otherwise a pointer to the static stktable_key filled with what is needed
* for the lookup.
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (!ts) /* key not present */
return 1;
if (!key)
return 0;
+ ts = stktable_lookup_key(t, key);
+
smp->flags = SMP_F_VOL_TEST;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = 0;
- ts = stktable_lookup_key(t, key);
if (ts)
smp->data.u.sint = ts->ref_cnt;