Changeset 8085


Ignore:
Timestamp:
Mar 25, 2009, 12:36:11 AM (13 years ago)
Author:
jhujhiti
Message:

(trunk libT) re-add rpc password to settings benc dict

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/crypto.c

    r8083 r8085  
    2020
    2121#include <openssl/bn.h>
    22 #include <openssl/des.h>
    2322#include <openssl/dh.h>
    2423#include <openssl/err.h>
  • trunk/libtransmission/session.c

    r8072 r8085  
    298298    tr_bencDictAddInt( d, TR_PREFS_KEY_RPC_AUTH_REQUIRED,        tr_sessionIsRPCPasswordEnabled( s ) );
    299299    tr_bencDictAddInt( d, TR_PREFS_KEY_RPC_ENABLED,              tr_sessionIsRPCEnabled( s ) );
     300    tr_bencDictAddStr( d, TR_PREFS_KEY_RPC_PASSWORD,             freeme[n++] = tr_sessionGetRPCPassword( s ) );
    300301    tr_bencDictAddInt( d, TR_PREFS_KEY_RPC_PORT,                 tr_sessionGetRPCPort( s ) );
    301302    tr_bencDictAddStr( d, TR_PREFS_KEY_RPC_USERNAME,             freeme[n++] = tr_sessionGetRPCUsername( s ) );
     
    14541455}
    14551456
     1457char*
     1458tr_sessionGetRPCPassword( const tr_session * session )
     1459{
     1460    assert( tr_isSession( session ) );
     1461
     1462    return tr_rpcGetPassword( session->rpcServer );
     1463}
     1464
    14561465void
    14571466tr_sessionSetRPCUsername( tr_session * session,
  • trunk/libtransmission/transmission.h

    r8072 r8085  
    371371                                const char * username );
    372372
     373/** @brief get the password used to restrict RPC requests.
     374    @return the password string. tr_free() when done.
     375    @see tr_sessionInit()
     376    @see tr_sessionSetRPCPassword() */
     377char* tr_sessionGetRPCPassword( const tr_session * session );
     378
    373379char* tr_sessionGetRPCUsername( const tr_session * session  );
    374380
Note: See TracChangeset for help on using the changeset viewer.