Merge remote branch 'origin/daniel/xavp'
[sip-router] / modules_k / pv / pv.c
index 9283828..5475271 100644 (file)
@@ -35,6 +35,7 @@
 #include "pv_shv.h"
 #include "pv_time.h"
 #include "pv_trans.h"
+#include "pv_select.h"
 #ifdef WITH_XAVP
 #include "pv_xavp.h"
 #endif
@@ -66,11 +67,17 @@ static pv_export_t mod_pvs[] = {
        { {"stat", sizeof("stat")-1}, /* statistics */
                PVT_OTHER, pv_get_stat, 0,
                pv_parse_stat_name, 0, 0, 0 },
+       { {"sel", sizeof("sel")-1}, /* select */
+               PVT_OTHER, pv_get_select, 0,
+               pv_parse_select_name, 0, 0, 0 },
+       {{"snd", (sizeof("snd")-1)}, PVT_OTHER, pv_get_snd, 0,
+               pv_parse_snd_name, 0, 0, 0},
 #ifdef WITH_XAVP
        { {"xavp", sizeof("xavp")-1}, /* xavp */
                PVT_OTHER, pv_get_xavp, pv_set_xavp,
                pv_parse_xavp_name, 0, 0, 0 },
 #endif
+
        {{"avp", (sizeof("avp")-1)}, PVT_AVP, pv_get_avp, pv_set_avp,
                pv_parse_avp_name, pv_parse_index, 0, 0},
        {{"hdr", (sizeof("hdr")-1)}, PVT_HDR, pv_get_hdr, 0, pv_parse_hdr_name,
@@ -254,12 +261,12 @@ static pv_export_t mod_pvs[] = {
        {{"rb", (sizeof("rb")-1)}, /* */
                PVT_MSG_BODY, pv_get_msg_body, 0,
                0, 0, 0, 0},
-       {{"rc", (sizeof("rc")-1)}, /* */
+       /* {{"rc", (sizeof("rc")-1)},
                PVT_OTHER, pv_get_return_code, 0,
                0, 0, 0, 0},
-       {{"retcode", (sizeof("retcode")-1)}, /* */
+       {{"retcode", (sizeof("retcode")-1)},
                PVT_OTHER, pv_get_return_code, 0,
-               0, 0, 0, 0},
+               0, 0, 0, 0}, */
        {{"rd", (sizeof("rd")-1)}, /* */
                PVT_RURI_DOMAIN, pv_get_ruri_attr, pv_set_ruri_host,
                0, 0, pv_init_iname, 2},
@@ -364,6 +371,10 @@ static pv_export_t mod_pvs[] = {
                pv_set_shvar, pv_parse_shvar_name, 0, 0, 0},
        { {"time", (sizeof("time")-1)}, PVT_CONTEXT, pv_get_time,
                0, pv_parse_time_name, 0, 0, 0},
+       { {"TV", (sizeof("TV")-1)}, PVT_OTHER, pv_get_timeval,
+               0, pv_parse_timeval_name, 0, 0, 0},
+       { {"nh", (sizeof("nh")-1)}, PVT_OTHER, pv_get_nh,
+               0, pv_parse_nh_name, 0, 0, 0},
 
        { {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
 };
@@ -426,11 +437,6 @@ static int mod_init(void)
                return -1;
        }
 
-       if(init_shvars()<0)
-       {
-               LM_ERR("init shvars failed\n");
-               return -1;
-       }
        return 0;
 }