Commit d3815dfd authored by linus's avatar linus Committed by linus

Reindent and remove trailing whitespace.

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@517 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent 317902ce
......@@ -392,7 +392,7 @@ void *dtlsservernew(void *arg) {
if (cert)
X509_free(cert);
exit:
exit:
if (ssl) {
SSL_shutdown(ssl);
SSL_free(ssl);
......
......@@ -106,7 +106,7 @@ FILE *pushgconffile(struct gconffile **cf, FILE *file, const char *description)
*cf = newcf;
return file;
errmalloc:
errmalloc:
free(desc);
fclose(file);
debug(DBG_ERR, "malloc failed");
......@@ -159,7 +159,7 @@ FILE *pushgconfpaths(struct gconffile **cf, const char *cfgpath) {
}
globfree(&globbuf);
exit:
exit:
if (curfile) {
free(curfile);
free(path);
......@@ -351,9 +351,9 @@ int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, in
debug(DBG_ERR, "configuration error, option %s needs a non-empty value", *opt);
goto errexit;
errmalloc:
errmalloc:
debug(DBG_ERR, "malloc failed");
errexit:
errexit:
free(*opt);
*opt = NULL;
free(*val);
......@@ -538,9 +538,9 @@ int getgenericconfig(struct gconffile **cf, char *block, ...) {
free(val);
}
errparam:
errparam:
debug(DBG_ERR, "getgenericconfig: internal parameter error");
errexit:
errexit:
free(opt);
free(val);
return 0;
......
......@@ -127,7 +127,7 @@ struct hostportres *newhostport(char *hostport, char *default_port, uint8_t pref
hp->prefixlen = 255;
return hp;
errexit:
errexit:
freehostport(hp);
return NULL;
}
......@@ -174,7 +174,7 @@ int resolvehostport(struct hostportres *hp, int socktype, uint8_t passive) {
}
return 1;
errexit:
errexit:
if (hp->addrinfo)
freeaddrinfo(hp->addrinfo);
return 0;
......
......@@ -35,7 +35,7 @@
* This is only for connected peers
* Example: With 3 UDP peers and 30 TLS peers, there will be a max of
* 1 + (2 + 2 * 3) + (2 * 30) + (2 * 30) = 129 threads
*/
*/
/* Bugs:
* May segfault when dtls connections go down? More testing needed
......@@ -395,7 +395,7 @@ int addserver(struct clsrvconf *conf) {
return 1;
errexit:
errexit:
freeserver(conf->servers, 0);
conf->servers = NULL;
return 0;
......@@ -520,7 +520,7 @@ void sendrq(struct request *rq) {
removeclientrqs_sendrq_freeserver_lock(0);
return;
errexit:
errexit:
if (rq->from)
rmclientrq(rq, rq->msg->id);
freerq(rq);
......@@ -1352,7 +1352,7 @@ struct server *findserver(struct realm **realm, struct tlv *username, uint8_t ac
if (srvconf)
server = srvconf->servers;
exit:
exit:
free(id);
return server;
}
......@@ -1536,9 +1536,9 @@ int radsrv(struct request *rq) {
freerealm(realm);
return 1;
rmclrqexit:
rmclrqexit:
rmclientrq(rq, msg->id);
exit:
exit:
freerq(rq);
free(userascii);
if (realm) {
......@@ -1690,7 +1690,7 @@ void replyh(struct server *server, unsigned char *buf) {
pthread_mutex_unlock(rqout->lock);
return;
errunlock:
errunlock:
radmsg_free(msg);
pthread_mutex_unlock(rqout->lock);
return;
......@@ -1715,7 +1715,7 @@ struct request *createstatsrvrq() {
}
return rq;
exit:
exit:
freerq(rq);
return NULL;
}
......@@ -1873,7 +1873,7 @@ void *clientwr(void *arg) {
}
}
}
errexit:
errexit:
conf->servers = NULL;
if (server->dynamiclookuparg) {
removeserversubrealms(realms, conf);
......@@ -2115,12 +2115,12 @@ struct realm *addrealm(struct list *realmlist, char *value, char **servers, char
debug(DBG_DBG, "addrealm: added realm %s", value);
goto exit;
errexit:
errexit:
while (list_shift(realm->srvconfs));
while (list_shift(realm->accsrvconfs));
freerealm(realm);
realm = NULL;
exit:
exit:
free(regex);
if (servers) {
if (realm)
......@@ -2266,7 +2266,7 @@ int dynamicconfig(struct server *server) {
if (ok)
return 1;
errexit:
errexit:
debug(DBG_WARN, "dynamicconfig: failed to obtain dynamic server config");
return 0;
}
......@@ -2886,7 +2886,7 @@ int confserver_cb(struct gconffile **cf, void *arg, char *block, char *opt, char
}
return 1;
errexit:
errexit:
free(conftype);
free(rewriteinalias);
freeclsrvconf(conf);
......@@ -3066,7 +3066,7 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *pretend, uint8
if (!(argc - optind))
return;
usage:
usage:
debugx(1, DBG_ERR, "Usage:\n%s [ -c configfile ] [ -d debuglevel ] [ -f ] [ -i pidfile ] [ -p ] [ -v ]", argv[0]);
}
......
......@@ -336,7 +336,7 @@ void *tcpservernew(void *arg) {
} else
debug(DBG_WARN, "tcpservernew: ignoring request, no matching TCP client");
exit:
exit:
shutdown(s, SHUT_RDWR);
close(s);
pthread_exit(NULL);
......
......@@ -432,7 +432,7 @@ void *tlsservernew(void *arg) {
if (cert)
X509_free(cert);
exit:
exit:
if (ssl) {
SSL_shutdown(ssl);
SSL_free(ssl);
......
......@@ -586,7 +586,7 @@ int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *v
debug(DBG_DBG, "conftls_cb: added TLS block %s", val);
return 1;
errexit:
errexit:
free(conf->cacertfile);
free(conf->cacertpath);
free(conf->certfile);
......
......@@ -181,10 +181,10 @@ int bindtoaddr(struct addrinfo *addrinfo, int family, int reuse, int v6only) {
if (reuse)
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
#ifdef IPV6_V6ONLY
#ifdef IPV6_V6ONLY
if (v6only)
setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on));
#endif
#endif
if (!bind(s, res->ai_addr, res->ai_addrlen))
return s;
debug(DBG_WARN, "bindtoaddr: bind failed");
......@@ -216,7 +216,7 @@ int connectnonblocking(int s, const struct sockaddr *addr, socklen_t addrlen, st
if (!getsockopt(s, SOL_SOCKET, SO_ERROR, (char*)&error, &len) && !error)
r = 0;
exit:
exit:
fcntl(s, F_SETFL, origflags);
return r;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment