Revision 8268c97a

View differences:

include/trade_sig_ha.h
41 41
 * @param[out] sig_type Type of signaling message.
42 42
 * @return 1 on success, <0 on error.
43 43
 */
44
int parseSignaling(uint8_t *buff, int buff_len, struct nodeID **owner_id, struct chunkID_set **cset,
45
        int *max_deliver, int *trans_id, int *sig_type);
44
int parseSignaling(uint8_t *buff, int buff_len, struct nodeID **owner_id,
45
                   struct chunkID_set **cset, int *max_deliver, int *trans_id,
46
                   enum signaling_type *sig_type);
46 47

  
47 48
/**
48 49
 * @brief Request a set of chunks from a Peer.
som/ChunkTrading/chunk_signaling.c
77 77

  
78 78
int parseSignaling(uint8_t *buff, int buff_len, struct nodeID **owner_id,
79 79
                   struct chunkID_set **cset, int *max_deliver, int *trans_id,
80
                   int *sig_type)
80
                   enum signaling_type *sig_type)
81 81
{
82 82
    struct sig_nal *signal;
83 83
    int ret, third_peer, meta_len;
som/Tests/chunk_signaling_test.c
103 103
  } else {
104 104
    /* Receive a chunk and print it! */        
105 105
    struct nodeID *owner;
106
    int sig_type, max_deliver, trans_id;
106
    int max_deliver, trans_id;
107
    enum signaling_type sig_type;
107 108
    int ret;
108 109
    struct nodeID *remote;    
109 110
    static uint8_t buff[BUFFSIZE];
110
    sig_type = max_deliver = trans_id = ret = 0;
111

  
112
    max_deliver = trans_id = ret = 0;
111 113
    ret = recv_from_peer(my_sock, &remote, buff, BUFFSIZE);   
112 114
    /* TODO: Error check! */
113 115
    if (buff[0] != MSG_TYPE_SIGNALLING) {

Also available in: Unified diff