Ignore:
Timestamp:
Dec 15, 2012, 12:01:59 AM (9 years ago)
Author:
jordan
Message:

(trunk, libT) faster JSON parsing for tr_variant. This mostly helps the Qt client, which makes heavy use of the JSON-based RPC calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r13667 r13672  
    631631        tr_variantDictAddInt (d, key, tr_torrentGetPeerLimit (tor));
    632632    else if (tr_streq (key, keylen, "peers"))
    633         addPeers (tor, tr_variantDictAdd (d, key));
     633        addPeers (tor, tr_variantDictAdd (d, key, keylen));
    634634    else if (tr_streq (key, keylen, "peersConnected"))
    635635        tr_variantDictAddInt (d, key, st->peersConnected);
     
    13331333        tr_variantListAddStr (&fields, "name");
    13341334        tr_variantListAddStr (&fields, "hashString");
    1335         addInfo (tor, tr_variantDictAdd (data->args_out, "torrent-added"), &fields);
     1335        addInfo (tor, tr_variantDictAdd (data->args_out, "torrent-added", 13), &fields);
    13361336        notify (data->session, TR_RPC_TORRENT_ADDED, tor);
    13371337        tr_variantFree (&fields);
     
    19711971            int       isArg = strcmp (key, "method") && strcmp (key, "tag");
    19721972            tr_variant * parent = isArg ? args : ⊤
    1973             tr_rpc_parse_list_str (tr_variantDictAdd (parent, key),
     1973            tr_rpc_parse_list_str (tr_variantDictAdd (parent, key, delim-pch),
    19741974                                  delim + 1,
    19751975                                  next ? (size_t)(
Note: See TracChangeset for help on using the changeset viewer.