aboutsummaryrefslogtreecommitdiff
path: root/src/or/routers.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-06-17 21:15:25 +0000
committerNick Mathewson <nickm@torproject.org>2003-06-17 21:15:25 +0000
commitb9480620c61e1eb5115353e1ff79c2d676d70964 (patch)
tree0bc3efe13faeb3878d361c41385912496af19b9a /src/or/routers.c
parentdf2789c1111cc66b2cea3e9d2c5236f6d95168c0 (diff)
downloadtor-b9480620c61e1eb5115353e1ff79c2d676d70964.tar
tor-b9480620c61e1eb5115353e1ff79c2d676d70964.tar.gz
Make log_fn work on apples with no workarounds needed in main code
svn:r330
Diffstat (limited to 'src/or/routers.c')
-rw-r--r--src/or/routers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/routers.c b/src/or/routers.c
index 6a47e7f74..0f6156cdf 100644
--- a/src/or/routers.c
+++ b/src/or/routers.c
@@ -47,7 +47,7 @@ int learn_my_address(struct sockaddr_in *me) {
log_fn(LOG_ERR,"Error obtaining local hostname");
return -1;
}
- log_fnf(LOG_DEBUG,"localhostname is '%s'.",localhostname);
+ log_fn(LOG_DEBUG,"localhostname is '%s'.",localhostname);
localhost = gethostbyname(localhostname);
if (!localhost) {
log_fn(LOG_ERR,"Error obtaining local host info.");
@@ -57,7 +57,7 @@ int learn_my_address(struct sockaddr_in *me) {
me->sin_family = AF_INET;
memcpy((void *)&me->sin_addr,(void *)localhost->h_addr,sizeof(struct in_addr));
me->sin_port = htons(options.ORPort);
- log_fnf(LOG_DEBUG,"chose address as '%s'.",inet_ntoa(me->sin_addr));
+ log_fn(LOG_DEBUG,"chose address as '%s'.",inet_ntoa(me->sin_addr));
return 0;
}
@@ -69,7 +69,7 @@ void router_retry_connections(void) {
for (i=0;i<directory->n_routers;i++) {
router = directory->routers[i];
if(!connection_exact_get_by_addr_port(router->addr,router->or_port)) { /* not in the list */
- log_fnf(LOG_DEBUG,"connecting to OR %s:%u.",router->address,router->or_port);
+ log_fn(LOG_DEBUG,"connecting to OR %s:%u.",router->address,router->or_port);
connection_or_connect(router);
}
}
@@ -199,26 +199,26 @@ int router_get_list_from_file(char *routerfile)
assert(routerfile);
if (strcspn(routerfile,CONFIG_LEGAL_FILENAME_CHARACTERS) != 0) {
- log_fnf(LOG_ERR,"Filename %s contains illegal characters.",routerfile);
+ log_fn(LOG_ERR,"Filename %s contains illegal characters.",routerfile);
return -1;
}
if(stat(routerfile, &statbuf) < 0) {
- log_fnf(LOG_ERR,"Could not stat %s.",routerfile);
+ log_fn(LOG_ERR,"Could not stat %s.",routerfile);
return -1;
}
/* open the router list */
fd = open(routerfile,O_RDONLY,0);
if (fd<0) {
- log_fnf(LOG_ERR,"Could not open %s.",routerfile);
+ log_fn(LOG_ERR,"Could not open %s.",routerfile);
return -1;
}
string = tor_malloc(statbuf.st_size+1);
if(read(fd,string,statbuf.st_size) != statbuf.st_size) {
- log_fnf(LOG_ERR,"Couldn't read all %d bytes of file '%s'.",statbuf.st_size,routerfile);
+ log_fn(LOG_ERR,"Couldn't read all %d bytes of file '%s'.",statbuf.st_size,routerfile);
free(string);
close(fd);
return -1;