Changeset 5577521 for lib


Ignore:
Timestamp:
05/18/18 14:55:54 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
86b365b, 8a237c7
Parents:
e8e9052
Message:

Fix out-of-date libwandder API usage when sending ETSI keepalive.

Also fixed a bunch of unused parameter warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_etsilive.c

    r0e2bdde r5577521  
    491491}
    492492
    493 static etsisocket_t *select_next_packet(etsithread_t *et, libtrace_t *libtrace) {
     493static etsisocket_t *select_next_packet(etsithread_t *et) {
    494494
    495495        int i;
     
    504504}
    505505
    506 static int etsilive_prepare_received(libtrace_t *libtrace, etsithread_t *et,
     506static int etsilive_prepare_received(libtrace_t *libtrace,
     507                etsithread_t *et UNUSED,
    507508                etsisocket_t *esock, libtrace_packet_t *packet) {
    508509
     
    557558                }
    558559
    559                 nextavail = select_next_packet(&(FORMAT_DATA->receivers[0]),
    560                                 libtrace);
     560                nextavail = select_next_packet(&(FORMAT_DATA->receivers[0]));
    561561                if (nextavail == NULL) {
    562562                        /* No complete packets available, take a short
     
    602602}
    603603
    604 static int etsilive_get_framing_length(const libtrace_packet_t *packet) {
     604static int etsilive_get_framing_length(const libtrace_packet_t *packet UNUSED) {
    605605
    606606        return 0;
     
    625625
    626626static libtrace_linktype_t etsilive_get_link_type(
    627                 const libtrace_packet_t *packet) {
     627                const libtrace_packet_t *packet UNUSED) {
    628628        return TRACE_TYPE_ETSILI;
    629629}
     
    692692
    693693        wandder_encoder_t *encoder;
    694         uint8_t *tosend;
    695         uint32_t tosendlen;
     694        wandder_encoded_result_t *tosend;
    696695        int ret = 0;
    697696        uint64_t zero = 0;
     
    753752        wandder_encode_endseq(encoder);     // End Outermost Sequence
    754753
    755         tosend = wandder_encode_finish(encoder, &tosendlen);
     754        tosend = wandder_encode_finish(encoder);
    756755
    757756        if (tosend != NULL) {
     
    759758                 * sending.
    760759                 */
    761                 ret = send(fd, tosend, tosendlen, 0);
    762         }
    763 
     760                ret = send(fd, tosend->encoded, tosend->len, 0);
     761        }
     762
     763        wandder_release_encoded_result(encoder, tosend);
    764764        free_wandder_encoder(encoder);
    765765        return ret;
Note: See TracChangeset for help on using the changeset viewer.