Changeset 4157a34c3d13eb5c24a6f212ff058080a60a4ee5

Show
Ignore:
Timestamp:
01/18/10 03:39:38 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1263785978 +0000
git-parent:

[3fe9ac238253c6c7f56a2a13a8aa6808d1a7ccd9]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1263785978 +0000
Message:

closes #226

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/stratcon_datastore.c

    rda6a1e8 r4157a34  
    3737#include "utils/noit_str.h" 
    3838#include "utils/noit_mkdir.h" 
     39#include "utils/noit_getip.h" 
    3940#include "stratcon_datastore.h" 
    4041#include "stratcon_realtime_http.h" 
     
    14841485  ds_single_detail _d = { 0 }, *d = &_d; 
    14851486  conn_q *cq; 
     1487  char ipv4_str[16]; 
     1488  struct in_addr r, l; 
     1489 
     1490  r.s_addr = htonl((4 << 24) || (2 << 16) || (2 << 8) || 1); 
     1491  memset(&l, 0, sizeof(l)); 
     1492  noit_getip_ipv4(r, &l); 
     1493  /* Ignore the error.. what are we going to do anyway */ 
     1494  if(inet_ntop(AF_INET, &l, ipv4_str, sizeof(l)) == NULL) 
     1495    strlcpy(ipv4_str, "0.0.0.0", sizeof(ipv4_str)); 
     1496 
    14861497  cq = get_conn_q_for_metanode(); 
    14871498 
     
    14931504 
    14941505    snprintf(time_as_str, sizeof(time_as_str), "%lu", (long unsigned int)time(NULL)); 
    1495     DECLARE_PARAM_STR("0.0.0.0", 7); 
     1506    DECLARE_PARAM_STR(ipv4_str, strlen(ipv4_str)); 
    14961507    DECLARE_PARAM_STR("", 0); 
    14971508    DECLARE_PARAM_STR("stratcond", 9); 
  • src/utils/Makefile.in

    r725c93d r4157a34  
    1212OBJS=noit_hash.o noit_skiplist.o noit_log.o noit_sem.o noit_str.o \ 
    1313        noit_b64.o noit_security.o noit_watchdog.o noit_mkdir.o \ 
     14        noit_getip.o \ 
    1415        @ATOMIC_OBJS@ 
    1516 
  • test/Makefile.in

    rc35ae3a r4157a34  
    7878        openssl ca -batch -config demo-openssl.cnf -in test-stratcon.csr -out test-stratcon.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120 
    7979 
    80 test-ca.crl:    demoCA-dir test-ca.key test-ca.crt badclient.key badclient.crt 
     80test-ca.crl:    test-ca.key test-ca.crt badclient.key badclient.crt 
    8181        openssl ca -config demo-openssl.cnf  -keyfile test-ca.key -cert test-ca.crt -revoke badclient.crt 
    8282        openssl ca -config demo-openssl.cnf  -keyfile test-ca.key -cert test-ca.crt -gencrl -out  test-ca.crl