Changeset 8e5751e


Ignore:
Timestamp:
2015-07-29T23:10:58Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
ee8307c
Parents:
69b94c3
Message:

Add RPC plugin directory to configure script instead of defaulting to
/tmp/rpcplugins.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r69b94c3 r8e5751e  
    1616config='/var/lib/bitlbee/'
    1717plugindir='$prefix/lib/bitlbee/'
     18rpcplugindir='$plugindir/rpc/'
    1819includedir='$prefix/include/bitlbee/'
    1920systemdsystemunitdir=''
     
    3233jabber="default-on"
    3334oscar="default-on"
    34 rpc="rpc-on"
    3535yahoo="default-on"
    3636
    3737twitter=1
    3838purple=0
     39rpc=1
    3940
    4041doc=1
     
    119120--datadir=...                                           $datadir
    120121--plugindir=...                                         $plugindir
     122--rpcplugindir=...                                      $rpcplugindir
    121123--systemdsystemunitdir=...                              $systemdsystemunitdir
    122124--pidfile=...                                           $pidfile
     
    131133--purple=0/1    Disable/enable libpurple support        $purple
    132134                (automatically disables other protocol modules)
    133 --rpc=0/1       Disable/enable RPC interface            $rpc
     135--rpc=0/1       Disable/enable RPC plugin interface     $rpc
    134136
    135137--doc=0/1       Disable/enable help.txt generation      $doc
     
    166168config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'`
    167169plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'`
     170rpcplugindir=$(eval echo "$rpcplugindir/" | sed 's/\/\{1,\}/\//g')
    168171includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'`
    169172libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'`
     
    184187DATADIR=$datadir
    185188PLUGINDIR=$plugindir
     189RPCPLUGINDIR=$rpcplugindir
    186190CONFIG=$config
    187191INCLUDEDIR=$includedir
     
    233237#define VARDIR "$datadir"
    234238#define PLUGINDIR "$plugindir"
     239#define RPCPLUGINDIR "$rpcplugindir"
    235240#define PIDFILE "$pidfile"
    236241#define IPCSOCKET "$ipcsocket"
     
    254259        LDFLAGS="$LDFLAGS -fsanitize=address"
    255260        debug=1
     261fi
     262
     263if [ "$tsan" = "1" ]; then
     264        echo
     265        echo "Threaded BitlBee? Have a nice tall glass of http://imgur.com/gallery/tX4qxzS"
     266        echo "No need to sanitise threads in a single-threaded process!"
    256267fi
    257268
     
    644655fi
    645656
     657if [ "$rpc" = 0 ]; then
     658        # Somewhat pointless at this stage already but at least this keeps it
     659        # out of bitlbee.pc which is probably a good thing.
     660        rpcplugindir=""
     661fi
     662
    646663otrprefix=""
    647664for i in / /usr /usr/local; do
     
    730747includedir=$includedir
    731748plugindir=$plugindir
     749rpcplugindir=$rpcplugindir
    732750
    733751Name: bitlbee
     
    919937echo '  Using event handler: '$events
    920938echo '  Using SSL library: '$ssl
    921 #echo '  Building with these storage backends: '$STORAGES
    922939
    923940if [ -n "$protocols" ]; then
  • protocols/rpc/rpc.c

    r69b94c3 r8e5751e  
    979979}
    980980
    981 #define PDIR "/tmp/rpcplugins"
    982 
    983981/* YA RLY :-/ */
    984982#ifndef UNIX_PATH_MAX
     
    988986
    989987void rpc_initmodule() {
    990         DIR *pdir = opendir(PDIR);
     988        DIR *pdir = opendir(RPCPLUGINDIR);
    991989        struct dirent *de;
    992990
     
    998996                        continue;
    999997
    1000                 char *fn = g_build_filename(PDIR, de->d_name, NULL);
     998                char *fn = g_build_filename(RPCPLUGINDIR, de->d_name, NULL);
    1001999                struct sockaddr_un su;
    10021000
Note: See TracChangeset for help on using the changeset viewer.