]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
please doxygen, fixup fake func prototypes and make typedef more portable.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 18 Jul 2008 15:29:33 +0000 (15:29 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 18 Jul 2008 15:29:33 +0000 (15:29 +0000)
git-svn-id: file:///svn/unbound/trunk@1160 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/worker.c
daemon/worker.h
libunbound/libworker.c
smallapp/worker_cb.c
util/tube.h

index 9512f447c2775fcbb174e25da649b22354a82d6d..d0e276c5704901e47456e3d3f9e58a1f87fd441e 100644 (file)
@@ -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);
index 55def23afcd4808e1abcd922881c030d100613fd..2823d400383c4b40ba872097892b83d7ad459715 100644 (file)
@@ -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
  */
index 68f98e5e0ade26a3f733d4dbfdb096ee94899662..629eb3f6b513577720c32f860d631438ed84e66e 100644 (file)
@@ -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), 
index 92e087e33ae309c2320f9b66209df70aeb4bb7ca..54d1f1fc81e17808550dcfb0bb18cb5d63783665 100644 (file)
 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), 
index 00092ec91bc108218e7c1e39f8addf554e08ba32..fecd1cf330c1ca301cf5b9f1975f5ddfb7577bd4 100644 (file)
@@ -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