Changeset 662 for trunk/c2s/main.c

Show
Ignore:
Timestamp:
10/08/08 12:44:06 (5 months ago)
Author:
smoku
Message:

Implemented My IP Address extension

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/c2s/main.c

    r639 r662  
    355355    switch(cb) { 
    356356        case sx_sasl_cb_GET_REALM: 
    357              
     357 
    358358            if(s->req_to == NULL)   /* this shouldn't happen */ 
    359359                my_realm = ""; 
     
    415415            return sx_sasl_ret_FAIL; 
    416416            break; 
    417          
     417 
    418418        case sx_sasl_cb_CHECK_AUTHZID: 
    419419            creds = (sx_sasl_creds_t) arg; 
     
    495495                    return sx_sasl_ret_OK; 
    496496            } 
    497              
     497 
    498498            r = snprintf(buf, sizeof(buf), "authreg.mechanisms.sasl.%s",mechbuf); 
    499499            if (r < -1 || r > sizeof(buf)) 
     
    558558    union xhashv xhv; 
    559559    time_t check_time = 0; 
    560      
     560 
    561561#ifdef HAVE_UMASK 
    562562    umask((mode_t) 0027); 
     
    571571        WSADATA wsaData; 
    572572        int err; 
    573          
     573 
    574574        wVersionRequested = MAKEWORD( 2, 2 ); 
    575          
     575 
    576576        err = WSAStartup( wVersionRequested, &wsaData ); 
    577577        if ( err != 0 ) { 
     
    691691    } 
    692692#endif 
    693              
     693 
    694694    /* get sasl online */ 
    695695    c2s->sx_sasl = sx_env_plugin(c2s->sx_env, sx_sasl_init, "xmpp", _c2s_sx_sasl_callback, (void *) c2s); 
     
    708708    /* get stanza ack up */ 
    709709    sx_env_plugin(c2s->sx_env, sx_ack_init); 
     710 
     711    /* and user IP address plugin */ 
     712    sx_env_plugin(c2s->sx_env, sx_address_init); 
    710713#endif 
    711714 
     
    758761            } 
    759762        } 
    760              
     763 
    761764        /* cleanup dead sess (before sx_t as sess->result uses sx_t nad cache) */ 
    762765        while(jqueue_size(c2s->dead_sess) > 0) { 
     
    808811                } 
    809812            } 
    810      
     813 
    811814            check_time = time(NULL); 
    812815        } 
     
    814817 
    815818    log_write(c2s->log, LOG_NOTICE, "shutting down"); 
    816      
     819 
    817820    if(xhash_iter_first(c2s->sessions)) 
    818821        do {