assert(conn && conn->type == CONN_TYPE_DIR);
- if(conn->inbuf_datalen < strlen(getstring)) { /* entire response available? */
+ if(conn->inbuf_datalen < (int)strlen(getstring)) { /* entire response available? */
log_fn(LOG_DEBUG,"Entire command not here yet. Waiting.");
return 0; /* not yet */
}
* non-zero. This is where we try to connect to all the other ORs,
* and start the listeners
*/
- retry_all_connections(options.ORPort, options.APPort, options.DirPort);
+ retry_all_connections((uint16_t) options.ORPort,
+ (uint16_t) options.APPort,
+ (uint16_t) options.DirPort);
for(;;) {
-#ifndef MS_WINDOWS /* do signal stuff only on unix */
+#ifndef MS_WIN32 /* do signal stuff only on unix */
if(please_dumpstats) {
dumpstats();
please_dumpstats = 0;
static void catch(int the_signal) {
-#ifndef MS_WINDOWS /* do signal stuff only on unix */
+#ifndef MS_WIN32 /* do signal stuff only on unix */
switch(the_signal) {
// case SIGABRT:
case SIGTERM:
}
void daemonize(void) {
+#ifndef MS_WINDOWS
/* Fork; parent exits. */
if (fork())
exit(0);
fclose(stdin);
fclose(stdout); /* XXX Nick: this closes our log, right? is it safe to leave this open? */
fclose(stderr);
+#endif
}
int tor_main(int argc, char *argv[]) {
* orconfig.h -- This file is *not* generated by autoconf. Instead,
* it has to be hand-edited to keep win32 happy.
*/
+#define MS_WINDOWS
+#define MS_WIN32
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H