Changeset 3578 for trunk/daemon/client.c


Ignore:
Timestamp:
Oct 26, 2007, 3:43:27 AM (15 years ago)
Author:
joshe
Message:

Add IPC messages to set and retrieve the encryption mode.
Implement encryption mode messages in -daemon and -remote.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/client.c

    r3175 r3578  
    492492
    493493    req->str = dircpy;
     494
     495    return 0;
     496}
     497
     498int
     499client_crypto( const char * mode )
     500{
     501    struct req * req;
     502    char       * modecpy;
     503
     504    modecpy = strdup( mode );
     505    if( NULL == modecpy )
     506    {
     507        mallocmsg( strlen( mode ) );
     508        return -1;
     509    }
     510
     511    req = addreq( IPC_MSG_CRYPTO, -1, NULL );
     512    if( NULL == req )
     513    {
     514        free( modecpy );
     515        return -1;
     516    }
     517
     518    req->str = modecpy;
    494519
    495520    return 0;
     
    801826                buf = ipc_mkint( con->ipc, &buflen, req->id, -1, req->num );
    802827                break;
     828            case IPC_MSG_CRYPTO:
    803829            case IPC_MSG_DIR:
    804830                buf = ipc_mkstr( con->ipc, &buflen, req->id, -1, req->str );
Note: See TracChangeset for help on using the changeset viewer.