Changeset 6005


Ignore:
Timestamp:
Jun 2, 2008, 7:57:16 PM (14 years ago)
Author:
charles
Message:

(libT) if the ACL passed in via tr_sessionInitFull() can't be parsed, log an tr_err() and use a TR_DEFAULT_RPC_ACL as the fallback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r6004 r6005  
    2121#include "rpc-server.h"
    2222#include "utils.h"
     23
     24#define MY_NAME "RPC Server"
    2325
    2426#define BUSY_INTERVAL_MSEC 30
     
    269271            const char  * acl )
    270272{
    271     tr_rpc_server * s = tr_new0( tr_rpc_server, 1 );
     273    char * errmsg;
     274    tr_rpc_server * s;
     275
     276    if(( errmsg = testACL ( acl )))
     277    {
     278        tr_nerr( MY_NAME, errmsg );
     279        tr_free( errmsg );
     280        acl = TR_DEFAULT_RPC_ACL;
     281        tr_nerr( MY_NAME, "using fallback ACL \"%s\"", acl );
     282    }
     283
     284    s = tr_new0( tr_rpc_server, 1 );
    272285    s->session = session;
    273286    s->port = port;
Note: See TracChangeset for help on using the changeset viewer.