Index: trunk/Monitoring/CNClient/Makefile
===================================================================
--- trunk/Monitoring/CNClient/Makefile	(revision 961)
+++ trunk/Monitoring/CNClient/Makefile	(revision 962)
@@ -1,6 +1,11 @@
-sendAMQPMsg:
-	#gcc -static -I/usr/local/include -L/usr/local/lib -Wall -o sendAMQPMsg send_AMQP_msg.c -lrabbitmq
-	gcc -static -Wall -o sendAMQPMsg send_AMQP_msg.c -lrabbitmq
+#all: clean
+#	sendAMQPMsg
+
+sendAMQPMsg: send_AMQP_msg.c
+	gcc -static -I/usr/local/include -L/usr/local/lib -Wall -o sendAMQPMsg send_AMQP_msg.c -lrabbitmq
 
 install: sendAMQPMsg
 	sudo cp sendAMQPMsg /usr/local/bin
+
+clean: sendAMQPMsg
+	rm -f sendAMQPMsg
Index: trunk/Monitoring/CNClient/sample/config.card.base64
===================================================================
--- trunk/Monitoring/CNClient/sample/config.card.base64	(revision 962)
+++ trunk/Monitoring/CNClient/sample/config.card.base64	(revision 962)
@@ -0,0 +1,80 @@
+IyAkSWQkCiMgVGhpcyBpcyBjb25maWcuY2FyZCBmaWxlIGZvciByZXN0YXJ0IHdpdGggYW4gTkVX
+IGxpYklHQ00gc2ltdWxhdGlvbiB0cmVlLgojCiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09
+PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI0QtLSBDb21wYXRp
+YmlsaXR5IC0KW0NvbXBhdGliaWxpdHldCmxpYklHQ009MS4wCiNELS0gVXNlckNob2ljZXMgLQpb
+VXNlckNob2ljZXNdCiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09CiMtLSAoPDggY2hhcnMg
+TUFYIGZvciBKb2JOYW1lKQpKb2JOYW1lPUJJR0JSTwojLS0tLS0gU2hvcnQgTmFtZSBvZiBFeHBl
+cmltZW50CkV4cGVyaW1lbnROYW1lPWNsaW0KIy0tLS0tIERFVlQgVEVTVCBQUk9EClNwYWNlTmFt
+ZT1URVNUCkxvbmdO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ZSBmaXJzdCBYIHNpbXVsYXRp
+b24ncyB5ZWFycwpTZWFzb25hbEZyZXF1ZW5jeU9mZnNldD0wCgojPT09PT09PT09PT09PT09PT09
+PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cg==
Index: trunk/Monitoring/CNClient/send_AMQP_msg.c
===================================================================
--- trunk/Monitoring/CNClient/send_AMQP_msg.c	(revision 961)
+++ trunk/Monitoring/CNClient/send_AMQP_msg.c	(revision 962)
@@ -234,4 +234,5 @@
 int main(int argc, char * const *argv) {
   char const *hostname;
+  int msg_count=1;
   int port;
   //char const *exchange;
@@ -242,4 +243,5 @@
   char *buf = NULL;
   int c;
+  int i;
   char *filepath = NULL;
   int file_flag=0;
@@ -252,5 +254,5 @@
   //parsing args
   opterr = 0;
-  while ((c = getopt (argc, argv, "b:ef:h:p:")) != -1)
+  while ((c = getopt (argc, argv, "b:ef:h:n:p:u")) != -1)
     switch (c)
       {
@@ -259,7 +261,4 @@
         break;
       case 'e':
-
-        fprintf(stderr, "Usage: amqp_producer host port\n");
-
 
         // --- example without config card ---
@@ -286,7 +285,13 @@
         hostname = optarg;
         break;
+      case 'n':
+        msg_count = atoi(optarg);
+        break;
       case 'p':
         port = atoi(optarg);
         break;
+      case 'u':
+        fprintf(stderr, "Usage: amqp_producer host port -b <body>\n");
+        exit(EXIT_SUCCESS);
       case '?':
         fprintf (stderr, "ERR001: incorrect argument '-%c'.\n", optopt);
@@ -374,5 +379,8 @@
     props.content_type = amqp_cstring_bytes("text/plain");
     props.delivery_mode = 2; /* persistent delivery mode */
-    die_on_error(amqp_basic_publish(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes(""), 0, 0, &props, amqp_cstring_bytes(body)), "Publishing");
+
+
+    for (i = 0; i < msg_count; i++)
+      die_on_error(amqp_basic_publish(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes(""), 0, 0, &props, amqp_cstring_bytes(body)), "Publishing");
   }
 
