Module: sip-router
Branch: master
Commit: 67ae0865fbdc175b0e72eadb6a098325e9168a70
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=67ae086…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Aug 31 13:01:46 2009 +0300
core & avpops: fix overlapping avp flag
- k avpops uses a flag to mark whether a loaded avp from db has changed,
in order to decide if worth to update db
- the value was overlapping with flags defined in sr core
- reported by Juha Heinanen
---
modules/avpops/avpops_impl.h | 2 +-
usr_avp.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/avpops/avpops_impl.h b/modules/avpops/avpops_impl.h
index 37afb6d..6e38007 100644
--- a/modules/avpops/avpops_impl.h
+++ b/modules/avpops/avpops_impl.h
@@ -41,7 +41,7 @@
/* flags used inside avps */
/* IMPORTANT: flagss 0-4 are reserved by core; 8-15 by script */
-#define AVP_IS_IN_DB (1<<7)
+#define AVP_IS_IN_DB (1<<12)
/* DB flags */
#define AVPOPS_DB_NAME_INT (1<<1)
diff --git a/usr_avp.h b/usr_avp.h
index 324bad4..b40ccdb 100644
--- a/usr_avp.h
+++ b/usr_avp.h
@@ -153,7 +153,11 @@ typedef struct avp_spec {
#define AVP_INDEX_BACKWARD (1<<11)
#define AVP_INDEX_ALL (AVP_INDEX_FORWARD | AVP_INDEX_BACKWARD)
-#define AVP_CUSTOM_FLAGS 12
+/* AVP DB flag used by avpops module - defined in avpops
+ * - kept here for reference */
+// #define AVP_IS_IN_DB (1<<12)
+
+#define AVP_CUSTOM_FLAGS 13
#define GALIAS_CHAR_MARKER '$'
Revision: 5915
http://openser.svn.sourceforge.net/openser/?rev=5915&view=rev
Author: juhe
Date: 2009-08-27 17:17:37 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
* Restored disappeared documentation related to pinging of gateways.
Modified Paths:
--------------
branches/1.5/modules/lcr/README
branches/1.5/modules/lcr/doc/lcr_admin.xml
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Hey list,
Due to technical reasons we are running openser1.0.1 on a tiny embedded
system.
I am exploring the way to pass a PV's value into the exported function from
my module,
and returning back a value from the function via the use of some other PV or
a newly added
AVP.
I am not sure how to follow this, as basic avpops operations aren't working
for me
in the config file itself (without introducing my custom module at all).
Could someone explain or provide an example as to how this would work?
I have taken a look at http://www.asipto.com/pub/openser-devel-guide/ regarding
adding a new module
but I'm not quite sure as to the details regarding avops and such.
Regards.
Hello,
I extended kamailio sl module to export similar API exported by ser
version of the module. This was the easy way to make all modules work
internally with one version of sl module -- the modules_k/sl. Shortly,
modules like modules_s/xmlrpc, modules_s/auth_db, modules_s/registrar
... should work even if you use modules_k/sl.
A full integration would require a more laborious process, since each
version has its own way of dealing with parameters of the functions
exported in config. Therefore, the config syntax is still depending of
which version of the module you use -- see the readme for each module. A
proper time to get to a single version would be when we unify the module
parameter format.
Juha, could you test and see if xmlrpc works ok now (I saw you are using
it with k sl module)? I removed the define that selected between sl
module versions, so it should work out of the bx no matter which version
of sl is used.
Cheers,
Daniel
--
Daniel-Constantin Mierla
* http://www.asipto.com/
Module: sip-router
Branch: master
Commit: 0658a37570683eaec57f138e5a07feb59f4bfbaf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0658a37…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Aug 28 11:44:37 2009 +0300
xmlrpc(s): remove the K sl define
- no more needed - the modules should work the same with any version
of sl module
---
modules_s/xmlrpc/Makefile | 7 -------
modules_s/xmlrpc/xmlrpc.c | 27 +--------------------------
2 files changed, 1 insertions(+), 33 deletions(-)
diff --git a/modules_s/xmlrpc/Makefile b/modules_s/xmlrpc/Makefile
index 93651a6..efcbf38 100644
--- a/modules_s/xmlrpc/Makefile
+++ b/modules_s/xmlrpc/Makefile
@@ -3,9 +3,6 @@
#
# WARNING: do not run this directly, it should be run by the master Makefile
-# Set to true if you want to use K sl module API
-USE_K_SL_API=false
-
include ../../Makefile.defs
auto_gen=
NAME=xmlrpc.so
@@ -14,8 +11,4 @@ LIBS +=-lxml2
DEFS+=-DSER_MOD_INTERFACE
-ifeq ($(USE_K_SL_API),true)
-DEFS+=-DUSE_K_SL_API
-endif
-
include ../../Makefile.modules
diff --git a/modules_s/xmlrpc/xmlrpc.c b/modules_s/xmlrpc/xmlrpc.c
index 4f82b12..c140626 100644
--- a/modules_s/xmlrpc/xmlrpc.c
+++ b/modules_s/xmlrpc/xmlrpc.c
@@ -55,11 +55,7 @@
#include "../../msg_translator.h"
#include "../../select.h"
#include "../../receive.h" /* needed by process_rpc / receive_msg() */
-#ifdef USE_K_SL_API
-#include "../../modules_k/sl/sl_api.h"
-#else
#include "../sl/sl.h"
-#endif
#include "../../nonsip_hooks.h"
#include "../../action.h" /* run_actions */
#include "../../script_cb.h" /* exec_*_script_cb */
@@ -382,11 +378,7 @@ static char* xmlrpc_route=0; /* default is the main route */
/** Reference to the sl (stateless replies) module of SER The sl module of SER
* is needed so that the xmlrpc SER module can send replies back to clients
*/
-#ifdef USE_K_SL_API
-struct sl_binds sl;
-#else
sl_api_t sl;
-#endif
static int xmlrpc_route_no=DEFAULT_RT;
/* if set, try autoconverting to the requested type if possible
@@ -743,20 +735,10 @@ static int send_reply(sip_msg_t* msg, str* body)
return -1;
}
-#ifdef USE_K_SL_API
- str s;
- s.s = "OK";
- s.len = 2;
- if (sl.send_reply(msg, 200, &s) == -1) {
- ERR("Error while sending reply\n");
- return -1;
- }
-#else
if (sl.reply(msg, 200, "OK") == -1) {
ERR("Error while sending reply\n");
return -1;
}
-#endif
return 0;
}
@@ -2214,20 +2196,13 @@ static int mod_init(void)
* We will need sl_send_reply from stateless
* module for sending replies
*/
-#ifdef USE_K_SL_API
- if (load_sl_api(&sl)!=0) {
- ERR("This module requires sl module\n");
- return -1;
- }
-#else
- bind_sl_t bind_sl;
+ bind_sl_t bind_sl;
bind_sl = (bind_sl_t)find_export("bind_sl", 0, 0);
if (!bind_sl) {
ERR("This module requires sl module\n");
return -1;
}
if (bind_sl(&sl) < 0) return -1;
-#endif
func_param.send = (rpc_send_f)rpc_send;
func_param.fault = (rpc_fault_f)rpc_fault;