- if (!firstone)
- strcat(optbuf, ",");
- strcat(optbuf, "FAILURE");
- firstone = FALSE;
- }
- if (bitset(QPINGONDELAY, to->q_flags))
- {
- if (!firstone)
- strcat(optbuf, ",");
- strcat(optbuf, "DELAY");
- firstone = FALSE;
+ bool firstone = TRUE;
+
+ strcat(optbuf, " NOTIFY=");
+ if (bitset(QPINGONSUCCESS, to->q_flags))
+ {
+ strcat(optbuf, "SUCCESS");
+ firstone = FALSE;
+ }
+ if (bitset(QPINGONFAILURE, to->q_flags))
+ {
+ if (!firstone)
+ strcat(optbuf, ",");
+ strcat(optbuf, "FAILURE");
+ firstone = FALSE;
+ }
+ if (bitset(QPINGONDELAY, to->q_flags))
+ {
+ if (!firstone)
+ strcat(optbuf, ",");
+ strcat(optbuf, "DELAY");
+ firstone = FALSE;
+ }
+ if (firstone)
+ strcat(optbuf, "NEVER");