Changeset 1732


Ignore:
Timestamp:
Apr 17, 2007, 5:31:02 PM (15 years ago)
Author:
joshe
Message:

Give up on using event bases for now so we can build with libevent 1.1.

Location:
branches/daemon/daemon
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/daemon/daemon/client.c

    r1708 r1732  
    181181    con->outfd = con->infd;
    182182    con->evout = con->evin;
    183     bufferevent_base_set( gl_base, con->evin );
     183    /* XXX bufferevent_base_set( gl_base, con->evin ); */
    184184    bufferevent_settimeout( con->evin, SERVER_TIMEOUT, SERVER_TIMEOUT );
    185185    bufferevent_enable( con->evin, EV_READ );
     
    266266        return -1;
    267267    }
    268     bufferevent_base_set( gl_base, con->evin );
     268    /* XXX bufferevent_base_set( gl_base, con->evin ); */
    269269    bufferevent_settimeout( con->evin, SERVER_TIMEOUT, SERVER_TIMEOUT );
    270270    bufferevent_enable( con->evin, EV_READ );
     
    280280        return -1;
    281281    }
    282     bufferevent_base_set( gl_base, con->evout );
     282    /* XXX bufferevent_base_set( gl_base, con->evout ); */
    283283    bufferevent_settimeout( con->evout, SERVER_TIMEOUT, SERVER_TIMEOUT );
    284284    bufferevent_enable( con->evout, EV_READ );
  • branches/daemon/daemon/daemon.c

    r1696 r1732  
    3636#include <getopt.h>
    3737#include <signal.h>
     38#include <stdarg.h>
    3839#include <stdlib.h>
    3940#include <stdio.h>
     
    9495    server_listen( sockfd );
    9596
    96     event_base_dispatch( evbase );
     97    event_dispatch();
     98    /* XXX event_base_dispatch( evbase ); */
    9799
    98100    return 1;
     
    279281
    280282void
    281 setupsigs( struct event_base * base )
     283setupsigs( struct event_base * base /* XXX */ UNUSED )
    282284{
    283285    static struct event ev_int;
     
    286288
    287289    signal_set( &ev_int, SIGINT, gotsig, NULL );
    288     event_base_set( base, &ev_int );
     290    /* XXX event_base_set( base, &ev_int ); */
    289291    signal_add( &ev_int, NULL );
    290292
    291293    signal_set( &ev_quit, SIGINT, gotsig, NULL );
    292     event_base_set( base, &ev_quit );
     294    /* XXX event_base_set( base, &ev_quit ); */
    293295    signal_add( &ev_quit, NULL );
    294296
    295297    signal_set( &ev_term, SIGINT, gotsig, NULL );
    296     event_base_set( base, &ev_term );
     298    /* XXX event_base_set( base, &ev_term ); */
    297299    signal_add( &ev_term, NULL );
    298300
  • branches/daemon/daemon/misc.h

    r1696 r1732  
    4242};
    4343
    44 struct event_base;
    4544struct bufferevent;
    46 
    47 /* this doesn't seem to be in the libevent header */
    48 int bufferevent_base_set( struct event_base *, struct bufferevent * );
    4945
    5046#ifdef __GNUC__
  • branches/daemon/daemon/proxy.c

    r1635 r1732  
    7979        return EXIT_FAILURE;
    8080    }
    81     bufferevent_base_set( base, gl_in );
     81    /* XXX bufferevent_base_set( base, gl_in ); */
    8282    bufferevent_enable( gl_in, EV_READ );
    8383    bufferevent_disable( gl_in, EV_WRITE );
     
    8989        return EXIT_FAILURE;
    9090    }
    91     bufferevent_base_set( base, gl_out );
     91    /* XXX bufferevent_base_set( base, gl_out ); */
    9292    bufferevent_disable( gl_out, EV_READ );
    9393    bufferevent_enable( gl_out, EV_WRITE );
     
    9999        return EXIT_FAILURE;
    100100    }
    101     bufferevent_base_set( base, gl_sock );
     101    /* XXX bufferevent_base_set( base, gl_sock ); */
    102102    bufferevent_enable( gl_sock, EV_READ );
    103103    bufferevent_enable( gl_sock, EV_WRITE );
    104104
    105     event_base_dispatch( base );
     105    event_dispatch();
     106    /* XXX event_base_dispatch( base ); */
    106107
    107108    return EXIT_FAILURE;
  • branches/daemon/daemon/remote.c

    r1708 r1732  
    187187    }
    188188
    189     event_base_dispatch( evbase );
     189    event_dispatch();
     190    /* event_base_dispatch( evbase ); */
    190191
    191192    return 1;
  • branches/daemon/daemon/server.c

    r1638 r1732  
    172172
    173173    event_set( ev, fd, EV_READ | EV_PERSIST, newclient, ev );
    174     event_base_set( gl_base, ev );
     174    /* XXX event_base_set( gl_base, ev ); */
    175175    event_add( ev, NULL );
    176176
     
    225225            return;
    226226        }
    227         bufferevent_base_set( gl_base, clev );
     227        /* XXX bufferevent_base_set( gl_base, clev ); */
    228228        bufferevent_settimeout( clev, CLIENT_TIMEOUT, CLIENT_TIMEOUT );
    229229
  • branches/daemon/daemon/torrents.c

    r1706 r1732  
    614614    {
    615615        evtimer_set( &gl_event, timerfunc, NULL );
    616         event_base_set( gl_base, &gl_event );
     616        /* XXX event_base_set( gl_base, &gl_event ); */
    617617    }
    618618
Note: See TracChangeset for help on using the changeset viewer.