[sr-dev] git:master: mqueue: fixed c&p errors in docs

Elena-Ramona Modroiu ramona at rosdev.ro
Thu Feb 4 12:58:07 CET 2010


Module: sip-router
Branch: master
Commit: 8ee09afb89aafac3c39989059e316324441c9843
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8ee09afb89aafac3c39989059e316324441c9843

Author: Elena-Ramona Modroiu <ramona at rosdev.ro>
Committer: Elena-Ramona Modroiu <ramona at rosdev.ro>
Date:   Thu Feb  4 12:57:02 2010 +0100

mqueue: fixed c&p errors in docs

---

 modules/mqueue/README               |   69 ++++++++++++++++++++++++-----------
 modules/mqueue/doc/mqueue_admin.xml |    4 +-
 2 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/modules/mqueue/README b/modules/mqueue/README
index 5cf2aea..4c439a4 100644
--- a/modules/mqueue/README
+++ b/modules/mqueue/README
@@ -17,21 +17,21 @@ Elena-Ramona Modroiu
 
    1. Admin Guide
 
-        1.1. Overview
-        1.2. Dependencies
+        1. Overview
+        2. Dependencies
 
-              1.2.1. Kamailio Modules
-              1.2.2. External Libraries or Applications
+              2.1. Kamailio Modules
+              2.2. External Libraries or Applications
 
-        1.3. Exported Parameters
+        3. Exported Parameters
 
-              1.3.1. mqueue (string)
+              3.1. mqueue (string)
 
-        1.4. Exported Functions
+        4. Exported Functions
 
-              1.4.1. mq_add(queue, key, value)
-              1.4.2. mq_fetch(queue)
-              1.4.3. mq_pv(queue)
+              4.1. mq_add(queue, key, value)
+              4.2. mq_fetch(queue)
+              4.3. mq_pv_free(queue)
 
    List of Examples
 
@@ -42,7 +42,25 @@ Elena-Ramona Modroiu
 
 Chapter 1. Admin Guide
 
-1.1. Overview
+   Table of Contents
+
+   1. Overview
+   2. Dependencies
+
+        2.1. Kamailio Modules
+        2.2. External Libraries or Applications
+
+   3. Exported Parameters
+
+        3.1. mqueue (string)
+
+   4. Exported Functions
+
+        4.1. mq_add(queue, key, value)
+        4.2. mq_fetch(queue)
+        4.3. mq_pv_free(queue)
+
+1. Overview
 
    This module offers generic message queue system in shared memory for
    inter-process communication via config file. One example of usage is to
@@ -52,22 +70,27 @@ Chapter 1. Admin Guide
    There can be defined many queues, access to values being done via
    pseudo variables.
 
-1.2. Dependencies
+2. Dependencies
+
+   2.1. Kamailio Modules
+   2.2. External Libraries or Applications
 
-1.2.1. Kamailio Modules
+2.1. Kamailio Modules
 
    The following modules must be loaded before this module:
      * None.
 
-1.2.2. External Libraries or Applications
+2.2. External Libraries or Applications
 
    The following libraries or applications must be installed before
    running Kamailio with this module loaded:
      * None.
 
-1.3. Exported Parameters
+3. Exported Parameters
 
-1.3.1. mqueue (string)
+   3.1. mqueue (string)
+
+3.1. mqueue (string)
 
    Definition of memory queue
 
@@ -87,9 +110,13 @@ modparam("mqueue", "mqueue", "name=myq;size=20;")
 modparam("mqueue", "mqueue", "name=qaz")
 ...
 
-1.4. Exported Functions
+4. Exported Functions
+
+   4.1. mq_add(queue, key, value)
+   4.2. mq_fetch(queue)
+   4.3. mq_pv_free(queue)
 
-1.4.1.  mq_add(queue, key, value)
+4.1.  mq_add(queue, key, value)
 
    Add a new item (key, value) in the queue. If max size of queue is
    exceeded, the oldest one is removed.
@@ -99,20 +126,20 @@ modparam("mqueue", "mqueue", "name=qaz")
 mq_add("myq", "$rU", "call from $fU");
 ...
 
-1.4.2.  mq_fetch(queue)
+4.2.  mq_fetch(queue)
 
    Take oldest item from que and fill $mqk(queue) and $mqv(queue) pseudo
    variables. Return true on success.
 
    Example 1.3. mq_fetch usage
 ...
-while(mq_add("myq"))
+while(mq_fetch("myq"))
 {
    xlog("$mqk(myq) - $mqv(myq)\n");
 }
 ...
 
-1.4.3.  mq_pv(queue)
+4.3.  mq_pv_free(queue)
 
    Free the item fetched in pseudo-variables. It is optional, a new fetch
    frees the old values.
diff --git a/modules/mqueue/doc/mqueue_admin.xml b/modules/mqueue/doc/mqueue_admin.xml
index 1cf3eda..e02ca38 100644
--- a/modules/mqueue/doc/mqueue_admin.xml
+++ b/modules/mqueue/doc/mqueue_admin.xml
@@ -125,7 +125,7 @@ mq_add("myq", "$rU", "call from $fU");
 		<title><function>mq_fetch</function> usage</title>
 		<programlisting format="linespecific">
 ...
-while(mq_add("myq"))
+while(mq_fetch("myq"))
 {
    xlog("$mqk(myq) - $mqv(myq)\n");
 }
@@ -136,7 +136,7 @@ while(mq_add("myq"))
 	
  	<section>
 	    <title>
-		<function moreinfo="none">mq_pv(queue)</function>
+		<function moreinfo="none">mq_pv_free(queue)</function>
 	    </title>
 	    <para>
 		Free the item fetched in pseudo-variables. It is optional, a new fetch




More information about the sr-dev mailing list