summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2007-05-03 13:34:50 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-05-03 13:34:50 +0000
commitcc7c9e8d558897da27bd4659127b8f0946755733 (patch)
tree6bcf83287ca20d37518b0f15db735b6e11d5a090 /radsecproxy.c
parentba96d1cc28b9f1a54720bc997b38a9fabf896cdd (diff)
using debug functions in main()
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@67 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index adbea4a..cbf5afd 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -49,6 +49,7 @@
#include <openssl/md5.h>
#include <openssl/hmac.h>
#include "radsecproxy.h"
+#include "debug.h"
static struct options options;
static struct client *clients;
@@ -1923,32 +1924,13 @@ void getmainconfig(const char *configfile) {
fclose(f);
}
-#if 0
-void parseargs(int argc, char **argv) {
- int c;
-
- while ((c = getopt(argc, argv, "p:")) != -1) {
- switch (c) {
- case 'p':
- udp_server_port = optarg;
- break;
- default:
- goto usage;
- }
- }
-
- return;
-
- usage:
- printf("radsecproxy [ -p UDP-port ]\n");
- exit(1);
-}
-#endif
-
int main(int argc, char **argv) {
pthread_t udpserverth;
/* pthread_attr_t joinable; */
int i;
+
+ debug(DBG_INFO, "debug test info");
+ debug(DBG_WARN, "debug test warn");
/* parseargs(argc, argv); */
getmainconfig(CONFIG_MAIN);
@@ -1961,7 +1943,7 @@ int main(int argc, char **argv) {
if (client_udp_count) {
udp_server_listen = server_create('U');
if (pthread_create(&udpserverth, NULL /*&joinable*/, udpserverrd, NULL))
- errx("pthread_create failed");
+ debug(DBG_ERR, "pthread_create failed");
}
if (client_tls_count || server_tls_count)
@@ -1969,7 +1951,7 @@ int main(int argc, char **argv) {
for (i = 0; i < server_count; i++)
if (pthread_create(&servers[i].clientth, NULL, clientwr, (void *)&servers[i]))
- errx("pthread_create failed");
+ debug(DBG_ERR, "pthread_create failed");
if (client_tls_count) {
tcp_server_listen = server_create('T');