*
* @param cls the `struct CadetTunnel` that got the message
* @param msg the message
- * @return #GNUNET_OK (continue to process)
+ * @return #GNUNET_OK on success (always)
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
handle_decrypted (void *cls,
/**
* Message callback
+ *
+ * @param msg message we received.
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing due to disconnect (no error)
+ * #GNUNET_SYSERR to stop further processing due to error
*/
static int
stdin_receiver (void *cls,
/**
* Message callback
+ *
+ * @param msg message we received.
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing due to disconnect (no error)
+ * #GNUNET_SYSERR to stop further processing due to error
*/
static int
stdin_receiver (void *cls,
/**
* Message callback
+ *
+ * @param msg message we received.
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing due to disconnect (no error)
+ * #GNUNET_SYSERR to stop further processing due to error
*/
static int
stdin_receiver (void *cls,
*
* @param cls clsoure with our `struct Microphone`
* @param msg the message from the helper
- * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
process_record_messages (void *cls,
*
* @param cls reservation request (`struct TokenizerContext`)
* @param message the actual message
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
tokenized_cb (void *cls,
*
* @param cls the `struct GSC_KeyExchangeInfo`
* @param m the message
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
deliver_message (void *cls,
*
* @param cls the closure (directory scanner object)
* @param msg message from the helper process
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
process_helper_msgs (void *cls,
*
* @param cls closure
* @param message the actual message
- * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing due to disconnect (no error)
+ * #GNUNET_SYSERR to stop further processing due to error
*/
typedef int
(*GNUNET_MessageTokenizerCallback) (void *cls,
*
* @param cls NULL
* @param message the message found on disk
- * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
inject_message (void *cls,
*
* @param cls identification of the client
* @param message the actual message
- *
- * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
tokenizer_cb (void *cls,
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_OK !=
GNUNET_CONFIGURATION_deserialize (cfg,
- config,
+ config,
ul_config_size,
NULL))
{
*
* @param cls the 'struct SendBuffer' to copy the converted message to
* @param hdr inbound message from the FIFO
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
stdin_send (void *cls,
*
* @param cls the 'struct SendBuffer' to copy to
* @param hdr the message we received to copy to the buffer
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
file_in_send (void *cls,
*
* @param cls current session as closure
* @param message the message to be forwarded to transport service
- * @return #GNUNET_OK
+ * @return #GNUNET_OK (all OK)
*/
static int
server_receive_mst_cb (void *cls,
*
* @param cls the `struct ClientState`
* @param msg message we received.
- * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing due to disconnect (no error)
+ * #GNUNET_SYSERR to stop further processing due to error
*/
static int
recv_message (void *cls,
struct ClientState *cstate = cls;
if (GNUNET_YES == cstate->in_destroy)
- return GNUNET_SYSERR;
+ return GNUNET_NO;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Received message of type %u and size %u from %s\n",
ntohs (msg->type),
GNUNET_MQ_inject_message (cstate->mq,
msg);
if (GNUNET_YES == cstate->in_destroy)
- return GNUNET_SYSERR;
+ return GNUNET_NO;
return GNUNET_OK;
}
int need_align;
unsigned long offset;
int ret;
+ int cbret;
GNUNET_assert (mst->off <= mst->pos);
GNUNET_assert (mst->pos <= mst->curr_buf);
if (one_shot == GNUNET_YES)
one_shot = GNUNET_SYSERR;
mst->off += want;
- if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
- hdr))
+ if (GNUNET_OK !=
+ (cbret = mst->cb (mst->cb_cls,
+ hdr)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Failure processing message of type %u and size %u\n",
- ntohs (hdr->type),
- ntohs (hdr->size));
+ if (GNUNET_SYSERR == cbret)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failure processing message of type %u and size %u\n",
+ ntohs (hdr->type),
+ ntohs (hdr->size));
return GNUNET_SYSERR;
}
if (mst->off == mst->pos)
}
if (one_shot == GNUNET_YES)
one_shot = GNUNET_SYSERR;
- if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
- hdr))
+ if (GNUNET_OK !=
+ (cbret = mst->cb (mst->cb_cls,
+ hdr)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Failure processing message of type %u and size %u\n",
- ntohs (hdr->type),
- ntohs (hdr->size));
+ if (GNUNET_SYSERR == cbret)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failure processing message of type %u and size %u\n",
+ ntohs (hdr->type),
+ ntohs (hdr->size));
return GNUNET_SYSERR;
}
buf += want;
*
* @param cls closure, NULL
* @param message message we got from the client (VPN channel interface)
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO to stop further processing (no error)
+ * #GNUNET_SYSERR to stop further processing with error
*/
static int
message_token (void *cls,