Преглед на файлове

added notification peer to the dmq module

Marius Bucur преди 14 години
родител
ревизия
7c81dea1c7
променени са 2 файла, в които са добавени 21 реда и са изтрити 0 реда
  1. 17 0
      modules_k/dmq/notification_peer.c
  2. 4 0
      modules_k/dmq/notification_peer.h

+ 17 - 0
modules_k/dmq/notification_peer.c

@@ -0,0 +1,17 @@
+#include "notification_peer.h"
+
+int add_notification_peer() {
+	int ret;
+	dmq_notification_peer.callback = dmq_notification_callback;
+	dmq_notification_peer.description.s = "dmqpeer";
+	dmq_notification_peer.description.len = 7;
+	dmq_notification_peer.peer_id.s = "dmqpeer";
+	dmq_notification_peer.peer_id.len = 7;
+	ret = register_dmq_peer(&dmq_notification_peer);
+	return ret;
+}
+
+int dmq_notification_callback(struct sip_msg* msg) {
+	LM_ERR("dmq triggered from dmq_notification_callback\n");
+	return 0;
+}

+ 4 - 0
modules_k/dmq/notification_peer.h

@@ -0,0 +1,4 @@
+#include "dmq.h"
+
+int add_notification_peer();
+int dmq_notification_callback(struct sip_msg* msg);