• Alessandro Rubini's avatar
    audit: msg.c: cleanup pack functions · ed3107cb
    Alessandro Rubini authored
    This commit assumes that "transportSpefic" in header byte 0 and
    "reserved" in header byte 1 are always 0.  Thus, it removes unneeded
    bitmasking and while at it uses names for message types.  It also
    removes redundant assignments and adds a few missing ones.
    
    The commit simplifies all the "pack" functions; it makes them
    consistent by setting all header fields in transmit order, and marking
    unclean spots (i.e. correctionField assignment).
    
    Buglets fixed in the process;
      - correctionField was not cleared in follow_up
      - pdelay_resp_f_up was using the wrong length name
      - pdelay_resp_f_up was not setting controlField and logMessageInterval
      - delay_req was not clearing flags
      - pdelay_req was not blanking the trailing bytes
      - pdelay_resp was not setting controlField and logMessageInterval
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    ed3107cb
msg.c 18.5 KB