Revision 581339c4

View differences:

Makefile
54 54
OBJS += topology.o
55 55
OBJS += chunk_signaling.o
56 56
OBJS += chunklock.o
57
OBJS += channel.o
57 58
ifdef THREADS
58 59
OBJS += loop-mt.o
59 60
CFLAGS += -pthread
measures.c
9 9
#include <mon.h>
10 10
#include <ml.h>
11 11

  
12
#include "channel.h"
12 13
#include "dbg.h"
13 14
#include <net_helper.h>
14 15

  
15
static const char* channel = "OfferStreamer3";
16

  
17 16
typedef struct nodeID {
18 17
	socketID_handle addr;
19 18
	int connID;	// connection associated to this node, -1 if myself
......
34 33
{
35 34
	*mh = monCreateMeasure(id, mc);
36 35
	monSetParameter (*mh, P_PUBLISHING_RATE, rate);
37
	monPublishStatisticalType(*mh, pubname, channel, st , length, NULL);
36
	monPublishStatisticalType(*mh, pubname, channel_get_name(), st , length, NULL);
38 37
	monActivateMeasure(*mh, dst, mt);
39 38
}
40 39

  
streamer.c
17 17
#include "net_helpers.h"
18 18
#include "loop.h"
19 19
#include "output.h"
20
#include "channel.h"
20 21

  
21 22
static const char *my_iface = NULL;
22 23
static int port = 6666;
......
35 36
{
36 37
  int o;
37 38

  
38
  while ((o = getopt(argc, argv, "b:o:c:t:p:i:P:I:f:m:l")) != -1) {
39
  while ((o = getopt(argc, argv, "b:o:c:t:p:i:P:I:f:m:lC:")) != -1) {
39 40
    switch(o) {
40 41
      case 'b':
41 42
        buff_size = atoi(optarg);
......
70 71
      case 'l':
71 72
        loop_input = true;
72 73
        break;
74
      case 'C':
75
        channel_set_name(optarg);
76
        break;
73 77
      default:
74 78
        fprintf(stderr, "Error: unknown option %c\n", o);
75 79

  
76 80
        exit(-1);
77 81
    }
78 82
  }
83

  
84
  if (!channel_get_name()) {
85
    channel_set_name("generic");
86
  }
79 87
}
80 88

  
81 89
static struct nodeID *init(void)

Also available in: Unified diff