Changeset 526


Ignore:
Timestamp:
11/14/09 21:00:31 (3 years ago)
Author:
eagle
Message:

port settings corrected

Location:
branches/garlicat
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/garlicat/configure

    r525 r526  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r525. 
     3# Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r526. 
    44# 
    55# Report bugs to <rahra@cypherpunk.at>. 
     
    597597PACKAGE_NAME='onioncat' 
    598598PACKAGE_TARNAME='onioncat' 
    599 PACKAGE_VERSION='0.2.0.r525' 
    600 PACKAGE_STRING='onioncat 0.2.0.r525' 
     599PACKAGE_VERSION='0.2.0.r526' 
     600PACKAGE_STRING='onioncat 0.2.0.r526' 
    601601PACKAGE_BUGREPORT='rahra@cypherpunk.at' 
    602602 
     
    12601260  # This message is too long to be a string in the A/UX 3.1 sh. 
    12611261  cat <<_ACEOF 
    1262 \`configure' configures onioncat 0.2.0.r525 to adapt to many kinds of systems. 
     1262\`configure' configures onioncat 0.2.0.r526 to adapt to many kinds of systems. 
    12631263 
    12641264Usage: $0 [OPTION]... [VAR=VALUE]... 
     
    13301330if test -n "$ac_init_help"; then 
    13311331  case $ac_init_help in 
    1332      short | recursive ) echo "Configuration of onioncat 0.2.0.r525:";; 
     1332     short | recursive ) echo "Configuration of onioncat 0.2.0.r526:";; 
    13331333   esac 
    13341334  cat <<\_ACEOF 
     
    14221422if $ac_init_version; then 
    14231423  cat <<\_ACEOF 
    1424 onioncat configure 0.2.0.r525 
     1424onioncat configure 0.2.0.r526 
    14251425generated by GNU Autoconf 2.62 
    14261426 
     
    14361436running configure, to aid debugging if configure makes a mistake. 
    14371437 
    1438 It was created by onioncat $as_me 0.2.0.r525, which was 
     1438It was created by onioncat $as_me 0.2.0.r526, which was 
    14391439generated by GNU Autoconf 2.62.  Invocation command line was 
    14401440 
     
    20852085# Define the identity of the package. 
    20862086 PACKAGE='onioncat' 
    2087  VERSION='0.2.0.r525' 
     2087 VERSION='0.2.0.r526' 
    20882088 
    20892089 
     
    22362236 
    22372237cat >>confdefs.h <<\_ACEOF 
    2238 #define SVN_REVISION "525" 
     2238#define SVN_REVISION "526" 
    22392239_ACEOF 
    22402240 
     
    52095209# values after options handling. 
    52105210ac_log=" 
    5211 This file was extended by onioncat $as_me 0.2.0.r525, which was 
     5211This file was extended by onioncat $as_me 0.2.0.r526, which was 
    52125212generated by GNU Autoconf 2.62.  Invocation command line was 
    52135213 
     
    52625262cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 
    52635263ac_cs_version="\\ 
    5264 onioncat config.status 0.2.0.r525 
     5264onioncat config.status 0.2.0.r526 
    52655265configured by $0, generated by GNU Autoconf 2.62, 
    52665266  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 
  • branches/garlicat/src/ocat.c

    r525 r526  
    239239   int urlconv = 0; 
    240240 
    241    snprintf(def, 100, "127.0.0.1:%d", NDESC(listen_port)); 
    242  
    243241   init_setup(); 
    244242 
     
    283281 
    284282         case 'l': 
    285             add_listener(optarg, def); 
     283            add_listener(optarg); 
    286284            break; 
    287285 
     
    352350      CNF(net_type) = NTYPE_I2P; 
    353351 
     352   snprintf(def, 100, "127.0.0.1:%d", NDESC(listen_port)); 
    354353   post_init_setup(); 
    355354 
     
    451450 
    452451   if (!CNF(oc_listen)) 
    453       add_listener(def, def); 
     452      add_listener(def); 
    454453 
    455454   // start socket receiver thread 
  • branches/garlicat/src/ocat.h

    r525 r526  
    603603int strsockaddr(const char *, struct sockaddr *); 
    604604void add_local_listeners(void); 
    605 void add_listener(const char *, const char *); 
     605void add_listener(const char *); 
    606606void delete_listeners(struct sockaddr **, int *, int); 
    607607int fdprintf(int, const char *, va_list); 
  • branches/garlicat/src/ocat_netdesc.h

    r525 r526  
    8686#define I2P_OCAT_CTRL_PORT 8067 
    8787//! Virtual destination port for hidden services 
    88 #define I2P_OCAT_DEST_PORT 8060 
     88#define I2P_OCAT_DEST_PORT I2P_OCAT_LISTEN_PORT 
    8989//! SOCKS port of TOR proxy 
    9090#define I2P_SOCKS_PORT 9051 
  • branches/garlicat/src/ocatlibe.c

    r500 r526  
    138138 
    139139 
    140 void add_listener(const char *buf, const char *def) 
    141 { 
     140void add_listener(const char *buf) 
     141{ 
     142   struct sockaddr_in6 saddr; 
     143 
     144   if (strsockaddr(buf, &saddr) == -1) 
     145      log_msg(LOG_EMERG, "could not convert address string '%s'", buf), exit(1); 
     146 
    142147   CNF(oc_listen_cnt)++; 
    143148   log_debug("reallocating sockaddr list to %d elements", CNF(oc_listen_cnt)); 
     
    147152      log_msg(LOG_ERR, "could not get memory for listener fds: \"%s\"", strerror(errno)), exit(1); 
    148153 
    149    log_debug("allocating sockaddr mem for \"%s\"", def); 
     154   log_debug("allocating sockaddr mem for \"%s\"", buf); 
    150155   if (!(CNF(oc_listen)[CNF(oc_listen_cnt) - 1] = calloc(1, sizeof(struct sockaddr_in6)))) 
    151156      log_msg(LOG_ERR, "could not get memory for listener : \"%s\"", strerror(errno)), exit(1); 
    152157 
    153158   CNF(oc_listen_fd)[CNF(oc_listen_cnt) - 1] = -1; 
    154  
    155    if (def) 
    156       if (strsockaddr(def, CNF(oc_listen)[CNF(oc_listen_cnt) - 1]) == -1) 
    157          log_msg(LOG_EMERG, "illegal default string '%s'", def), exit(1); 
    158  
    159    if (strsockaddr(buf, CNF(oc_listen)[CNF(oc_listen_cnt) - 1]) == -1) 
    160       log_msg(LOG_EMERG, "could not convert address string '%s'", buf), exit(1); 
     159   memcpy(CNF(oc_listen)[CNF(oc_listen_cnt) - 1], &saddr, sizeof(saddr)); 
    161160} 
    162161 
  • branches/garlicat/src/ocatsetup.c

    r525 r526  
    130130   setup_.uptime = time(NULL); 
    131131 
    132    setup_.socks_dst->sin_family = AF_INET; 
    133    setup_.socks_dst->sin_port = htons(TOR_SOCKS_PORT); 
    134    setup_.socks_dst->sin_addr.s_addr = htonl(INADDR_LOOPBACK); 
    135 #ifdef HAVE_SIN_LEN 
    136    setup_.socks_dst->sin_len = SOCKADDR_SIZE(setup_.socks_dst); 
    137 #endif 
    138  
    139132#ifdef DEBUG 
    140133   snprintf(setup_.version, VERSION_STRING_LEN, "%s (c) %s -- compiled %s %s", PACKAGE_STRING, OCAT_AUTHOR, __DATE__, __TIME__); 
     
    151144   setup_.ocat_dest_port = NDESC(vdest_port); 
    152145   setup_.ocat_ctrl_port = NDESC(ctrl_port); 
     146 
     147   setup_.socks_dst->sin_family = AF_INET; 
     148   setup_.socks_dst->sin_port = htons(NDESC(socks_port)); 
     149   setup_.socks_dst->sin_addr.s_addr = htonl(INADDR_LOOPBACK); 
     150#ifdef HAVE_SIN_LEN 
     151   setup_.socks_dst->sin_len = SOCKADDR_SIZE(setup_.socks_dst); 
     152#endif 
    153153 
    154154   ctrl_listen_.sin_family = AF_INET; 
Note: See TracChangeset for help on using the changeset viewer.