Changeset 2227


Ignore:
Timestamp:
Jun 29, 2007, 2:21:29 AM (16 years ago)
Author:
joshe
Message:

Add client/server name to IPC version handshake.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/client.c

    r1926 r2227  
    5252    int                  infd;
    5353    int                  outfd;
    54     struct ipc_info      ipc;
     54    struct ipc_info    * ipc;
    5555    struct bufferevent * evin;
    5656    struct bufferevent * evout;
     
    169169        return -1;
    170170    }
    171     ipc_newcon( &con->ipc, gl_tree );
     171    con->ipc = ipc_newcon( gl_tree );
     172    if( NULL == con->ipc )
     173    {
     174        mallocmsg( sizeof *con->ipc );
     175        close( fd );
     176        free( con );
     177    }
    172178    con->infd = fd;
    173179    con->evin = bufferevent_new( fd, canread, didwrite, ohshit, con );
    174180    if( NULL == con->evin )
    175181    {
    176         mallocmsg( -1 );
     182        errnomsg( "failed to create bufferevent" );
    177183        close( fd );
     184        ipc_freecon( con->ipc );
    178185        free( con );
    179186        return -1;
     
    275282    {
    276283        bufferevent_free( con->evin );
     284        bufferevent_free( con->evout );
    277285        free( con );
    278286        close( tocmd[1] );
     
    284292    bufferevent_enable( con->evout, EV_READ );
    285293
    286     ipc_newcon( &con->ipc, gl_tree );
     294    con->ipc = ipc_newcon( gl_tree );
     295    if( NULL == con->ipc )
     296    {
     297        mallocmsg( sizeof *con->ipc );
     298        bufferevent_free( con->evin );
     299        bufferevent_free( con->evout );
     300        free( con );
     301        close( tocmd[1] );
     302        close( fromcmd[0] );
     303        return -1;
     304    }
     305
    287306    if( 0 > sendvers( con ) )
    288307    {
     
    687706    }
    688707
    689     res = ipc_parse( &con->ipc, buf, len, con );
     708    res = ipc_parse( con->ipc, buf, len, con );
    690709    if( 0 > res )
    691710    {
     
    721740    struct stritem * jj;
    722741
    723     if( !HASVERS( &con->ipc ) )
     742    if( !HASVERS( con->ipc ) )
    724743    {
    725744        return;
     
    742761            case IPC_MSG_STOPALL:
    743762            case IPC_MSG_REMOVEALL:
    744                 buf = ipc_mkempty( &con->ipc, &buflen, req->id, req->tag );
     763                buf = ipc_mkempty( con->ipc, &buflen, req->id, req->tag );
    745764                break;
    746765            case IPC_MSG_ADDMANYFILES:
     
    750769                    ii++;
    751770                }
    752                 val = ipc_initval( &con->ipc, req->id, -1, &pk, TYPE_LIST );
     771                val = ipc_initval( con->ipc, req->id, -1, &pk, TYPE_LIST );
    753772                if( NULL != val && !tr_bencListReserve( val, ii ) )
    754773                {
     
    764783                break;
    765784            case IPC_MSG_ADDONEFILE:
    766                 val = ipc_initval( &con->ipc, req->id, -1, &pk, TYPE_DICT );
     785                val = ipc_initval( con->ipc, req->id, -1, &pk, TYPE_DICT );
    767786                if( NULL != val && !tr_bencDictReserve( val, 1 ) )
    768787                {
     
    779798            case IPC_MSG_UPLIMIT:
    780799            case IPC_MSG_PEX:
    781                 buf = ipc_mkint( &con->ipc, &buflen, req->id, -1, req->num );
     800                buf = ipc_mkint( con->ipc, &buflen, req->id, -1, req->num );
    782801                break;
    783802            case IPC_MSG_DIR:
    784                 buf = ipc_mkstr( &con->ipc, &buflen, req->id, -1, req->str );
     803                buf = ipc_mkstr( con->ipc, &buflen, req->id, -1, req->str );
    785804                SAFEFREE( req->str );
    786805                break;
     
    788807            case IPC_MSG_STOP:
    789808            case IPC_MSG_REMOVE:
    790                 val = ipc_initval( &con->ipc, req->id, -1, &pk, TYPE_LIST );
     809                val = ipc_initval( con->ipc, req->id, -1, &pk, TYPE_LIST );
    791810                if( NULL != val && !tr_bencListReserve( val, req->listlen ) )
    792811                {
     
    803822            case IPC_MSG_GETINFOALL:
    804823            case IPC_MSG_GETSTATALL:
    805                 buf = ipc_mkgetinfo( &con->ipc, &buflen, req->id, req->tag,
     824                buf = ipc_mkgetinfo( con->ipc, &buflen, req->id, req->tag,
    806825                                     req->types, NULL );
    807826                break;
     
    839858    size_t      len;
    840859
    841     buf = ipc_mkvers( &len );
     860    buf = ipc_mkvers( &len, "Transmission remote" VERSION_STRING );
    842861    if( NULL == buf )
    843862    {
  • trunk/daemon/server.c

    r2149 r2227  
    5252    int                  fd;
    5353    struct bufferevent * ev;
    54     struct ipc_info      ipc;
     54    struct ipc_info    * ipc;
    5555    RB_ENTRY( client )   link;
    5656};
     
    224224        }
    225225
     226        client->ipc = ipc_newcon( gl_tree );
     227        if( NULL == client->ipc )
     228        {
     229            mallocmsg( sizeof *client->ipc );
     230            close( clfd );
     231            free( client );
     232            return;
     233        }
     234
    226235        clev = bufferevent_new( clfd, doread, noop, byebye, client );
    227236        if( NULL == clev )
    228237        {
     238            errnomsg( "failed to create bufferevent" );
    229239            close( clfd );
     240            ipc_freecon( client->ipc );
    230241            free( client );
    231             mallocmsg( -1 );
    232242            return;
    233243        }
     
    236246
    237247        client->fd      = clfd;
    238         ipc_newcon( &client->ipc, gl_tree );
    239248        client->ev      = clev;
    240249        old = RB_INSERT( allclients, &gl_clients, client );
     
    247256
    248257        bufferevent_enable( clev, EV_READ );
    249         buf = ipc_mkvers( &buflen );
     258        buf = ipc_mkvers( &buflen, "Transmission daemon " VERSION_STRING );
    250259        if( 0 > queuemsg( client, buf, buflen ) )
    251260        {
     
    299308    bufferevent_free( ev );
    300309    close( client->fd );
     310    ipc_freecon( client->ipc );
    301311    if( gl_debug )
    302312    {
     
    331341    }
    332342
    333     res = ipc_parse( &client->ipc, buf, len, client );
     343    res = ipc_parse( client->ipc, buf, len, client );
    334344
    335345    if( gl_exiting )
     
    401411    }
    402412
    403     buf = ipc_mkempty( &client->ipc, &buflen, id, tag );
     413    buf = ipc_mkempty( client->ipc, &buflen, id, tag );
    404414    ret = queuemsg( client, buf, buflen );
    405415    free( buf );
     
    442452    }
    443453
    444     added = ipc_initval( &client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
     454    added = ipc_initval( client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
    445455    if( NULL == added )
    446456    {
     
    521531    if( TORRENT_ID_VALID( tor ) )
    522532    {
    523         val = ipc_initval( &client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
     533        val = ipc_initval( client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
    524534        if( NULL == val )
    525535        {
     
    663673
    664674    /* initialize packet */
    665     pkinf = ipc_initval( &client->ipc, respid, tag, &pk, TYPE_LIST );
     675    pkinf = ipc_initval( client->ipc, respid, tag, &pk, TYPE_LIST );
    666676    if( NULL == pkinf )
    667677    {
     
    848858    }
    849859
    850     pkinf = ipc_initval( &client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
     860    pkinf = ipc_initval( client->ipc, IPC_MSG_INFO, tag, &pk, TYPE_LIST );
    851861    if( NULL == pkinf )
    852862    {
     
    898908    {
    899909        case IPC_MSG_GETAUTOMAP:
    900             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_AUTOMAP, tag,
     910            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_AUTOMAP, tag,
    901911                             torrent_get_port_mapping() );
    902912            break;
    903913        case IPC_MSG_GETAUTOSTART:
    904             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_AUTOSTART, tag,
     914            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_AUTOSTART, tag,
    905915                             torrent_get_autostart() );
    906916            break;
    907917        case IPC_MSG_GETDIR:
    908             buf = ipc_mkstr( &client->ipc, &buflen, IPC_MSG_DIR, tag,
     918            buf = ipc_mkstr( client->ipc, &buflen, IPC_MSG_DIR, tag,
    909919                             torrent_get_directory() );
    910920            break;
    911921        case IPC_MSG_GETDOWNLIMIT:
    912             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_DOWNLIMIT, tag,
     922            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_DOWNLIMIT, tag,
    913923                             torrent_get_downlimit() );
    914924            break;
    915925        case IPC_MSG_GETPEX:
    916             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_PEX, tag,
     926            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_PEX, tag,
    917927                             torrent_get_pex() );
    918928            break;
    919929        case IPC_MSG_GETPORT:
    920             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_PORT, tag,
     930            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_PORT, tag,
    921931                             torrent_get_port() );
    922932            break;
    923933        case IPC_MSG_GETUPLIMIT:
    924             buf = ipc_mkint( &client->ipc, &buflen, IPC_MSG_UPLIMIT, tag,
     934            buf = ipc_mkint( client->ipc, &buflen, IPC_MSG_UPLIMIT, tag,
    925935                             torrent_get_uplimit() );
    926936            break;
     
    950960    }
    951961
    952     pkval = ipc_initval( &client->ipc, IPC_MSG_SUP, tag, &pk, TYPE_LIST );
     962    pkval = ipc_initval( client->ipc, IPC_MSG_SUP, tag, &pk, TYPE_LIST );
    953963    if( NULL == pkval )
    954964    {
     
    975985            return;
    976986        }
    977         found = ipc_msgid( &client->ipc, name->val.s.s );
    978         if( IPC__MSG_COUNT == found || !ipc_ishandled( &client->ipc, found ) )
     987        found = ipc_msgid( client->ipc, name->val.s.s );
     988        if( IPC__MSG_COUNT == found || !ipc_ishandled( client->ipc, found ) )
    979989        {
    980990            continue;
  • trunk/gtk/ipc.c

    r2208 r2227  
    7272    enum contype       type;
    7373    struct ipc_funcs * msgs;
    74     struct ipc_info    ipc;
     74    struct ipc_info  * ipc;
    7575    union
    7676    {
     
    222222  }
    223223
     224  con->ipc = ipc_newcon( con->msgs );
     225  if( NULL == con->ipc )
     226  {
     227      ipc_freemsgs( con->msgs );
     228      g_free( con );
     229      return FALSE;
     230  }
     231
    224232  ipc_setdefmsg( con->msgs, all_default );
    225   ipc_newcon( &con->ipc, con->msgs );
    226233
    227234  con->u.client.loop = g_main_loop_new(NULL, TRUE);
     
    334341  }
    335342
    336   buf = ipc_mkvers( &size );
     343  buf = ipc_mkvers( &size, "Transmission GTK+ " VERSION_STRING );
    337344  if( NULL == buf )
    338345  {
     
    357364  memcpy(newcon, con, sizeof(*newcon));
    358365  newcon->fd = fd;
    359   ipc_newcon( &newcon->ipc, con->msgs );
    360   newcon->source = io_new(fd, NULL, srv_io_received, all_io_closed, newcon);
    361 
    362   if( NULL == newcon->source )
     366
     367  newcon->ipc = ipc_newcon( con->msgs );
     368  if( NULL == newcon->ipc )
    363369  {
    364370      g_free( newcon );
     
    367373  }
    368374
    369   buf = ipc_mkvers( &size );
    370   if( NULL == buf )
     375  newcon->source = io_new(fd, NULL, srv_io_received, all_io_closed, newcon);
     376  if( NULL == newcon->source )
    371377  {
     378      ipc_freecon( newcon->ipc );
    372379      g_free( newcon );
    373380      close( fd );
     
    375382  }
    376383
     384  buf = ipc_mkvers( &size, "Transmission GTK+ " VERSION_STRING );
     385  if( NULL == buf )
     386  {
     387      ipc_freecon( newcon->ipc );
     388      g_free( newcon );
     389      close( fd );
     390      return;
     391  }
     392
    377393  io_send_keepdata( newcon->source, buf, size );
    378394}
     
    396412    }
    397413
    398     res = ipc_parse( &con->ipc, data, len, con );
     414    res = ipc_parse( con->ipc, data, len, con );
    399415
    400416    if( 0 > res )
     
    432448    }
    433449
    434     res = ipc_parse( &con->ipc, data, len, con );
     450    res = ipc_parse( con->ipc, data, len, con );
    435451
    436452    if( 0 > res )
     
    453469    }
    454470
    455     if( HASVERS( &con->ipc ) && 0 == cli->msgid )
     471    if( HASVERS( con->ipc ) && 0 == cli->msgid )
    456472    {
    457473        client_sendmsg( con );
     
    474490    {
    475491        case IPC_MSG_ADDMANYFILES:
    476             val = ipc_initval( &con->ipc, cli->msg, -1, &packet, TYPE_LIST );
     492            val = ipc_initval( con->ipc, cli->msg, -1, &packet, TYPE_LIST );
    477493            if( NULL == val ||
    478494                tr_bencListReserve( val, g_list_length( cli->files ) ) )
     
    493509            break;
    494510        case IPC_MSG_QUIT:
    495             buf = ipc_mkempty( &con->ipc, &size, cli->msg, -1 );
     511            buf = ipc_mkempty( con->ipc, &size, cli->msg, -1 );
    496512            saved = errno;
    497513            break;
     
    519535    close(con->fd);
    520536  con->fd = -1;
     537  ipc_freecon( con->ipc );
    521538
    522539  switch(con->type) {
     
    690707    typeflags = ipc_infotypes( respid, types );
    691708
    692     pkval = ipc_initval( &con->ipc, respid, tag, &packet, TYPE_LIST );
     709    pkval = ipc_initval( con->ipc, respid, tag, &packet, TYPE_LIST );
    693710    if( NULL == pkval )
    694711    {
     
    748765    typeflags = ipc_infotypes( respid, val );
    749766
    750     pkval = ipc_initval( &con->ipc, respid, tag, &packet, TYPE_LIST );
     767    pkval = ipc_initval( con->ipc, respid, tag, &packet, TYPE_LIST );
    751768    if( NULL == pkval )
    752769    {
     
    820837    }
    821838
    822     pkval = ipc_initval( &con->ipc, IPC_MSG_INFO, tag, &packet, TYPE_LIST );
     839    pkval = ipc_initval( con->ipc, IPC_MSG_INFO, tag, &packet, TYPE_LIST );
    823840    if( NULL == pkval )
    824841    {
     
    963980        case IPC_MSG_GETAUTOMAP:
    964981            hstat = tr_handleStatus( tr_core_handle( srv->core ) );
    965             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_AUTOMAP, tag,
     982            buf = ipc_mkint( con->ipc, &size, IPC_MSG_AUTOMAP, tag,
    966983                             !TR_NAT_TRAVERSAL_IS_DISABLED(
    967984                                 hstat->natTraversalStatus ) );
    968985            break;
    969986        case IPC_MSG_GETAUTOSTART:
    970             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_AUTOSTART, tag, 1 );
     987            buf = ipc_mkint( con->ipc, &size, IPC_MSG_AUTOSTART, tag, 1 );
    971988            break;
    972989        case IPC_MSG_GETDIR:
     
    974991            /* XXX sending back "" when we're prompting is kind of bogus */
    975992            pref = strbool( pref ) ? "" : getdownloaddir();
    976             buf = ipc_mkstr( &con->ipc, &size, IPC_MSG_DIR, tag, pref );
     993            buf = ipc_mkstr( con->ipc, &size, IPC_MSG_DIR, tag, pref );
    977994            break;
    978995        case IPC_MSG_GETDOWNLIMIT:
     
    982999                num = tr_prefs_get_int_with_default( PREF_ID_DOWNLIMIT );
    9831000            }
    984             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_DOWNLIMIT, tag, num );
     1001            buf = ipc_mkint( con->ipc, &size, IPC_MSG_DOWNLIMIT, tag, num );
    9851002            break;
    9861003        case IPC_MSG_GETPEX:
    987             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_PEX, tag,
     1004            buf = ipc_mkint( con->ipc, &size, IPC_MSG_PEX, tag,
    9881005                             tr_prefs_get_bool_with_default( PREF_ID_PEX ) );
    9891006            break;
    9901007        case IPC_MSG_GETPORT:
    991             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_PORT, tag,
     1008            buf = ipc_mkint( con->ipc, &size, IPC_MSG_PORT, tag,
    9921009                             tr_prefs_get_int_with_default( PREF_ID_PORT ) );
    9931010            break;
     
    9981015                num = tr_prefs_get_int_with_default( PREF_ID_UPLIMIT );
    9991016            }
    1000             buf = ipc_mkint( &con->ipc, &size, IPC_MSG_UPLIMIT, tag, num );
     1017            buf = ipc_mkint( con->ipc, &size, IPC_MSG_UPLIMIT, tag, num );
    10011018            break;
    10021019        default:
     
    11081125    }
    11091126
    1110     pkval = ipc_initval( &con->ipc, IPC_MSG_SUP, tag, &packet, TYPE_LIST );
     1127    pkval = ipc_initval( con->ipc, IPC_MSG_SUP, tag, &packet, TYPE_LIST );
    11111128    if( NULL == pkval )
    11121129    {
     
    11281145            continue;
    11291146        }
    1130         found = ipc_msgid( &con->ipc, name->val.s.s );
    1131         if( IPC__MSG_COUNT == found || !ipc_ishandled( &con->ipc, found ) )
     1147        found = ipc_msgid( con->ipc, name->val.s.s );
     1148        if( IPC__MSG_COUNT == found || !ipc_ishandled( con->ipc, found ) )
    11321149        {
    11331150            continue;
     
    11711188    size_t            size;
    11721189
    1173     buf = ipc_mkempty( &con->ipc, &size, id, tag );
     1190    buf = ipc_mkempty( con->ipc, &size, id, tag );
    11741191    if( NULL == buf )
    11751192    {
  • trunk/libtransmission/ipcparse.c

    r2201 r2227  
    293293}
    294294
     295struct ipc_info *
     296ipc_newcon( struct ipc_funcs * funcs )
     297{
     298    struct ipc_info * info;
     299
     300    info = calloc( 1, sizeof *info );
     301    if( NULL != info )
     302    {
     303        info->funcs = funcs;
     304        info->vers  = -1;
     305    }
     306
     307    return info;
     308}
     309
    295310void
    296 ipc_newcon( struct ipc_info * info, struct ipc_funcs * funcs )
    297 {
    298     bzero( info, sizeof *info );
    299     info->funcs = funcs;
    300     info->vers  = -1;
     311ipc_freecon( struct ipc_info * info )
     312{
     313    if( NULL != info )
     314    {
     315        free( info->label );
     316        free( info );
     317    }
    301318}
    302319
     
    440457
    441458uint8_t *
    442 ipc_mkvers( size_t * len )
     459ipc_mkvers( size_t * len, const char * label )
    443460{
    444461    benc_val_t pk, * dict;
     
    453470
    454471    tr_bencInit( dict, TYPE_DICT );
    455     if( tr_bencDictReserve( dict, 2 ) )
     472    if( tr_bencDictReserve( dict, ( NULL == label ? 2 : 3 ) ) )
    456473    {
    457474        SAFEBENCFREE( &pk );
     
    460477    tr_bencInitInt( tr_bencDictAdd( dict, "min" ), PROTO_VERS_MIN );
    461478    tr_bencInitInt( tr_bencDictAdd( dict, "max" ), PROTO_VERS_MAX );
     479    if( NULL != label )
     480        tr_bencInitStr( tr_bencDictAdd( dict, "label" ), label, -1, 1 );
    462481
    463482    ret = ipc_mkval( &pk, len );
  • trunk/libtransmission/ipcparse.h

    r2201 r2227  
    124124    struct ipc_funcs * funcs;
    125125    int                vers;
     126    char             * label;
    126127};
    127128
    128129#define HASVERS( info )         ( 0 < (info)->vers )
     130#define VERSLABEL( info )       ( (info)->label )
    129131
    130132#define TORRENT_ID_VALID( id )  ( 0 < (id) && INT_MAX > (id) )
     
    140142void         ipc_setdefmsg( struct ipc_funcs *, trd_msgfunc );
    141143void         ipc_freemsgs ( struct ipc_funcs * );
    142 void         ipc_newcon   ( struct ipc_info *, struct ipc_funcs * );
     144struct ipc_info * ipc_newcon( struct ipc_funcs * );
     145void         ipc_freecon  ( struct ipc_info * );
    143146
    144147/* message creation */
     
    153156uint8_t *    ipc_mkstr    ( struct ipc_info *, size_t *, enum ipc_msg, int64_t,
    154157                            const char * );
    155 uint8_t *    ipc_mkvers   ( size_t * );
     158uint8_t *    ipc_mkvers   ( size_t *, const char * );
    156159uint8_t *    ipc_mkgetinfo( struct ipc_info *, size_t *, enum ipc_msg, int64_t,
    157160                            int, const int * );
  • trunk/macosx/IPCController.m

    r2149 r2227  
    7777@interface IPCClient : NSObject
    7878{
    79     NSFileHandle  * _handle;
    80     struct ipc_info _ipc;
    81     IPCController * _controller;
    82     NSMutableData * _buf;
     79    NSFileHandle    * _handle;
     80    struct ipc_info * _ipc;
     81    IPCController   * _controller;
     82    NSMutableData   * _buf;
    8383}
    8484
     
    270270
    271271    _handle     = [handle retain];
    272     ipc_newcon( &_ipc, funcs );
     272    _ipc        = ipc_newcon( funcs );
    273273    _controller = controller;
    274274    _buf        = [[NSMutableData alloc] init];
    275275
    276     buf = ipc_mkvers( &size );
    277     if( nil == _buf || NULL == buf || ![self sendresp: buf size: size] )
     276    buf = ipc_mkvers( &size, "Transmission MacOS X " VERSION_STRING );
     277    if( NULL == _ipc || nil == _buf || NULL == buf ||
     278        ![self sendresp: buf size: size] )
    278279    {
    279280        [self release];
     
    296297    [_handle release];
    297298    [_buf    release];
     299    ipc_freecon( _ipc );
    298300    [super   dealloc];
    299301}
     
    306308- (struct ipc_info *) ipc
    307309{
    308     return &_ipc;
     310    return _ipc;
    309311}
    310312
     
    339341        return;
    340342
    341     res = ipc_parse( &_ipc, [_buf mutableBytes], [_buf length], self );
     343    res = ipc_parse( _ipc, [_buf mutableBytes], [_buf length], self );
    342344
    343345    if( 0 > res )
     
    393395    size_t    size;
    394396
    395     buf = ipc_mkempty( &_ipc, &size, msgid, tag );
     397    buf = ipc_mkempty( _ipc, &size, msgid, tag );
    396398    if( NULL == buf )
    397399        return FALSE;
     
    408410    size_t    size;
    409411
    410     buf = ipc_mkint( &_ipc, &size, msgid, tag, val );
     412    buf = ipc_mkint( _ipc, &size, msgid, tag, val );
    411413    if( NULL == buf )
    412414        return FALSE;
     
    426428
    427429    if( [val canBeConvertedToEncoding: NSUTF8StringEncoding] )
    428         buf = ipc_mkstr( &_ipc, &size, msgid, tag,
     430        buf = ipc_mkstr( _ipc, &size, msgid, tag,
    429431                         [val cStringUsingEncoding: NSUTF8StringEncoding] );
    430432    else
     
    435437        sucky = [NSMutableData dataWithData: data];
    436438        [sucky appendBytes: "" length: 1];
    437         buf = ipc_mkstr( &_ipc, &size, msgid, tag, [sucky bytes] );
     439        buf = ipc_mkstr( _ipc, &size, msgid, tag, [sucky bytes] );
    438440    }
    439441    if( NULL == buf )
     
    456458    int            res;
    457459
    458     pkinf = ipc_initval( &_ipc, respid, tag, &packet, TYPE_LIST );
     460    pkinf = ipc_initval( _ipc, respid, tag, &packet, TYPE_LIST );
    459461    if( NULL == pkinf )
    460462        goto fail;
  • trunk/misc/ipcproto.txt

    r2030 r2227  
    7272with "min" and "max" keys. This deprecated version format indicates
    7373the only version supported by the server.
     74
     75The version dictionary may optionally contain a key "label". This is a
     76human-readable name for the software, it is not machine-readable and
     77neither servers nor clients should attempt to parse it.
    7478
    7579An example message containing minimum and maximum versions 1 and 2:
Note: See TracChangeset for help on using the changeset viewer.