mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 11:49:28 -05:00
please doxygen, fixup fake func prototypes and make typedef more portable.
git-svn-id: file:///svn/unbound/trunk@1160 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
e4ef5a6156
commit
afe9b3e83c
5 changed files with 11 additions and 12 deletions
|
|
@ -999,7 +999,7 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
|||
if(worker->thread_num != 0) {
|
||||
/* start listening to commands */
|
||||
if(!tube_listen_cmd(worker->cmd, worker->base,
|
||||
cfg->msg_buffer_size, worker_handle_control_cmd,
|
||||
cfg->msg_buffer_size, &worker_handle_control_cmd,
|
||||
worker)) {
|
||||
log_err("could not create control compt.");
|
||||
worker_delete(worker);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ struct outbound_entry* worker_send_query(uint8_t* qname, size_t qnamelen,
|
|||
/**
|
||||
* process control messages from the main thread.
|
||||
* @param tube: tube control message came on.
|
||||
* @param buf: buffer with message in it.
|
||||
* @param buffer: buffer with message in it.
|
||||
* @param error: if error (NETEVENT_*) happened.
|
||||
* @param arg: user argument
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
#include "util/data/dname.h"
|
||||
#include "util/data/msgreply.h"
|
||||
#include "util/data/msgencode.h"
|
||||
#include "util/tube.h"
|
||||
|
||||
/** handle new query command for bg worker */
|
||||
static void handle_newq(struct libworker* w, uint8_t* buf, uint32_t len);
|
||||
|
|
@ -963,12 +964,11 @@ libworker_read_msg(int fd, uint8_t** buf, uint32_t* len, int nonblock)
|
|||
}
|
||||
|
||||
/* --- fake callbacks for fptr_wlist to work --- */
|
||||
int worker_handle_control_cmd(struct comm_point* ATTR_UNUSED(c),
|
||||
void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
|
||||
struct comm_reply* ATTR_UNUSED(reply_info))
|
||||
void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
|
||||
ldns_buffer* ATTR_UNUSED(buffer), int ATTR_UNUSED(error),
|
||||
void* ATTR_UNUSED(arg))
|
||||
{
|
||||
log_assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@
|
|||
struct comm_reply;
|
||||
struct comm_point;
|
||||
struct module_qstate;
|
||||
struct tube;
|
||||
|
||||
int worker_handle_control_cmd(struct comm_point* ATTR_UNUSED(c),
|
||||
void* ATTR_UNUSED(arg), int ATTR_UNUSED(error),
|
||||
struct comm_reply* ATTR_UNUSED(reply_info))
|
||||
void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
|
||||
ldns_buffer* ATTR_UNUSED(buffer), int ATTR_UNUSED(error),
|
||||
void* ATTR_UNUSED(arg))
|
||||
{
|
||||
log_assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int worker_handle_request(struct comm_point* ATTR_UNUSED(c),
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ struct tube;
|
|||
* void mycallback(tube, buffer, error, argument);
|
||||
* if error is true (NETEVENT_*), buffer is probably NULL.
|
||||
*/
|
||||
typedef void (tube_callback_t)(struct tube* tube, ldns_buffer* buffer,
|
||||
int error, void* arg);
|
||||
typedef void tube_callback_t(struct tube*, ldns_buffer*, int, void*);
|
||||
|
||||
/**
|
||||
* A pipe
|
||||
|
|
|
|||
Loading…
Reference in a new issue