aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-09-04 14:05:40 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-09-04 14:05:40 +0200
commit599b626695044a021707da971e76642d6d889ec3 (patch)
tree6dfc78e3c0cfc89565bf71914889aa6ec7fc0bf6
parentc04ef6f8f719bc8a4db20352bde33e2de87da422 (diff)
downloadpaccache-599b626695044a021707da971e76642d6d889ec3.tar.gz
paccache-599b626695044a021707da971e76642d6d889ec3.tar.zst
reformat long functions0.1.10
-rw-r--r--pacredir.c25
-rw-r--r--pacredir.h25
2 files changed, 40 insertions, 10 deletions
diff --git a/pacredir.c b/pacredir.c
index 9337047..cc8ae03 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -162,8 +162,15 @@ int remove_host(const char * host, const char * type) {
/*** browse_callback ***
* Called whenever a new services becomes available on the LAN or is removed from the LAN */
-static void browse_callback(AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name,
- const char *type, const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void* userdata) {
+static void browse_callback(AvahiServiceBrowser *b,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,
+ const char *name,
+ const char *type,
+ const char *domain,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ void* userdata) {
char * host;
char intname[IFNAMSIZ];
struct ignore_interfaces * tmp_ignore_interfaces = ignore_interfaces;
@@ -221,7 +228,9 @@ out:
}
/*** client_callback ***/
-static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
+static void client_callback(AvahiClient *c,
+ AvahiClientState state,
+ AVAHI_GCC_UNUSED void * userdata) {
assert(c);
if (state == AVAHI_CLIENT_FAILURE) {
@@ -302,8 +311,14 @@ static void * get_http_code(void * data) {
/*** ahc_echo ***
* called whenever a http request is received */
-static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * uri, const char * method,
- const char * version, const char * upload_data, size_t * upload_data_size, void ** ptr) {
+static int ahc_echo(void * cls,
+ struct MHD_Connection * connection,
+ const char * uri,
+ const char * method,
+ const char * version,
+ const char * upload_data,
+ size_t * upload_data_size,
+ void ** ptr) {
static int dummy;
struct MHD_Response * response;
int ret;
diff --git a/pacredir.h b/pacredir.h
index d8ec90c..eb54769 100644
--- a/pacredir.h
+++ b/pacredir.h
@@ -68,16 +68,31 @@ int add_host(const char * host, const uint16_t port, const char * type);
int remove_host(const char * host, const char * type);
/* browse_callback */
-static void browse_callback(AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name,
- const char *type, const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void* userdata);
+static void browse_callback(AvahiServiceBrowser *b,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,
+ const char *name,
+ const char *type,
+ const char *domain,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ void* userdata);
/* client_callback */
-static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata);
+static void client_callback(AvahiClient *c,
+ AvahiClientState state,
+ AVAHI_GCC_UNUSED void * userdata);
/* get_http_code */
static void * get_http_code(void * data);
/* ahc_echo */
-static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * uri, const char * method,
- const char * version, const char * upload_data, size_t * upload_data_size, void ** ptr);
+static int ahc_echo(void * cls,
+ struct MHD_Connection * connection,
+ const char * uri,
+ const char * method,
+ const char * version,
+ const char * upload_data,
+ size_t * upload_data_size,
+ void ** ptr);
/* sig_callback */
void sig_callback(int signal);