Revision 483ff9b6

View differences:

include/tman.h
121 121
  @param metadata_size Number of bytes of the metadata.
122 122
  @return 1 if successful, -1 otherwise.
123 123
 */
124
int tmanChangeMetadata(struct nodeID *peer, void *metadata, int metadata_size);
124
int tmanChangeMetadata(void *metadata, int metadata_size);
125 125

  
126 126
/**
127 127
  @brief Get the metadata of the neighbors.
include/topmanager.h
84 84
*/
85 85
int topRemoveNeighbour(struct nodeID *neighbour);
86 86

  
87
int topChangeMetadata(struct nodeID *peer, void *metadata, int metadata_size);
87
int topChangeMetadata(void *metadata, int metadata_size);
88 88

  
89 89
/**
90 90
  @brief Initialise the Topology Manager.
som/Tests/topology.c
25 25
{
26 26
	// this because if my own metadata are to be changed, it shouldn't be done twice!
27 27
 	if (counter <= TMAN_MAX_IDLE)
28
 		return topChangeMetadata(peer,metadata,metadata_size);
29
    return tmanChangeMetadata(peer,metadata,metadata_size);
28
 		return topChangeMetadata(metadata,metadata_size);
29
    return tmanChangeMetadata(metadata,metadata_size);
30 30
}
31 31

  
32 32
int topoAddNeighbour(struct nodeID *neighbour, void *metadata, int metadata_size, tmanRankingFunction rfun)
som/Tests/topology_test_attr.c
123 123
  }
124 124
  printf("goin' %s\n", status_print(my_attr.state));
125 125
  myself = create_node(my_addr, port);
126
  topChangeMetadata(myself, &my_attr, sizeof(struct peer_attributes));
126
  topChangeMetadata(&my_attr, sizeof(struct peer_attributes));
127 127
  nodeid_free(myself);
128 128
}
129 129

  
som/TopologyManager/ncast.c
67 67
  return 1;
68 68
}
69 69

  
70
int topChangeMetadata(struct nodeID *peer, void *metadata, int metadata_size)
70
int topChangeMetadata(void *metadata, int metadata_size)
71 71
{
72
  if (topo_proto_metadata_update(peer, metadata, metadata_size) <= 0) {
72
  if (topo_proto_metadata_update(metadata, metadata_size) <= 0) {
73 73
    return -1;
74 74
  }
75 75

  
som/TopologyManager/tman.c
159 159
}
160 160

  
161 161

  
162
int tmanChangeMetadata(struct nodeID *peer, void *metadata, int metadata_size)
162
int tmanChangeMetadata(void *metadata, int metadata_size)
163 163
{
164
  if (topo_proto_metadata_update(peer, metadata, metadata_size) <= 0) {
164
  if (topo_proto_metadata_update(metadata, metadata_size) <= 0) {
165 165
    return -1;
166 166
  }
167 167
  mymeta = metadata;
som/TopologyManager/topo_proto.c
105 105
  return topo_query_peer(local_cache, dst, MSG_TYPE_TOPOLOGY, NCAST_QUERY);
106 106
}
107 107

  
108
int topo_proto_metadata_update(struct nodeID *peer, void *meta, int meta_size)
108
int topo_proto_metadata_update(void *meta, int meta_size)
109 109
{
110
  if (cache_metadata_update(myEntry, peer, meta, meta_size) > 0) {
110
  if (cache_metadata_update(myEntry, nodeid(myEntry, 0), meta, meta_size) > 0) {
111 111
    return 1;
112 112
  }
113 113

  
som/TopologyManager/topo_proto.h
5 5
int tman_query_peer(struct peer_cache *local_cache, struct nodeID *dst);
6 6
int ncast_query_peer(struct peer_cache *local_cache, struct nodeID *dst);
7 7
//int topo_query_peer(struct peer_cache *local_cache, struct nodeID *dst);
8
int topo_proto_metadata_update(struct nodeID *peer, void *meta, int meta_size);
8
int topo_proto_metadata_update(void *meta, int meta_size);
9 9
int topo_proto_init(struct nodeID *s, void *meta, int meta_size);

Also available in: Unified diff