Merge pull request #61 from painless-security/jennifer/request_id
[trust_router.git] / common / tr_mq.c
index fd8a42c..07080b6 100644 (file)
@@ -122,6 +122,9 @@ TR_MQ *tr_mq_new(TALLOC_CTX *mem_ctx)
     mq->head=NULL;
     mq->tail=NULL;
     mq->last_hi_prio=NULL;
+
+    mq->notify_cb=NULL;
+    mq->notify_cb_arg=NULL;
   }
   return mq;
 }
@@ -291,7 +294,8 @@ int tr_mq_pop_timeout(time_t seconds, struct timespec *ts)
  * has passed, returns an existing message but will not wait if one is
  * not already available. If ts_abort is null, no blocking.  Not
  * guaranteed to wait if an error occurs - immediately returns without
- * a message. */
+ * a message. Use tr_mq_pop_timeout() to get an absolute time that
+ * is guaranteed compatible with this function. */
 TR_MQ_MSG *tr_mq_pop(TR_MQ *mq, struct timespec *ts_abort)
 {
   TR_MQ_MSG *popped=NULL;