[or-cvs] Make log_fn work on apples with no workarounds needed in ma...
Nick Mathewson
nickm at seul.org
Tue Jun 17 21:15:27 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv14905/src/or
Modified Files:
routers.c
Log Message:
Make log_fn work on apples with no workarounds needed in main code
Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- routers.c 14 Jun 2003 01:28:25 -0000 1.35
+++ routers.c 17 Jun 2003 21:15:25 -0000 1.36
@@ -47,7 +47,7 @@
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 @@
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 @@
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 @@
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;
More information about the tor-commits
mailing list