Module: kamailio Branch: master Commit: 89c65fa3210ab0682d4cb699d732ac1653ba0221 URL: https://github.com/kamailio/kamailio/commit/89c65fa3210ab0682d4cb699d732ac1653ba0221
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2018-08-27T10:47:34+02:00 app_sqlang: implemented KSR.pv.gete(...) --- Modified: src/modules/app_sqlang/app_sqlang_api.c --- Diff: https://github.com/kamailio/kamailio/commit/89c65fa3210ab0682d4cb699d732ac1653ba0221.diff Patch: https://github.com/kamailio/kamailio/commit/89c65fa3210ab0682d4cb699d732ac1653ba0221.patch --- diff --git a/src/modules/app_sqlang/app_sqlang_api.c b/src/modules/app_sqlang/app_sqlang_api.c index 0d4672c32b..1d4f60abd6 100644 --- a/src/modules/app_sqlang/app_sqlang_api.c +++ b/src/modules/app_sqlang/app_sqlang_api.c @@ -277,9 +277,12 @@ static int sqlang_gettype(HSQUIRRELVM J, int idx) */ static SQInteger sqlang_sr_get_str_null(HSQUIRRELVM J, int rmode) { - if(rmode) { + if(rmode==1) { sqlang_pushlstring(J, "<<null>>", 8); return 1; + } else if(rmode==2) { + sqlang_pushlstring(J, "", 0); + return 1; } else { return 0; } @@ -347,6 +350,14 @@ static SQInteger sqlang_sr_pv_getw(HSQUIRRELVM J) return sqlang_sr_pv_get_mode(J, 1); } +/** + * + */ +static SQInteger sqlang_sr_pv_gete(HSQUIRRELVM J) +{ + return sqlang_sr_pv_get_mode(J, 2); +} + /** * */ @@ -538,6 +549,7 @@ static SQInteger sqlang_sr_pv_is_null (HSQUIRRELVM J) const SQRegFunction _sr_kemi_pv_J_Map[] = { { "get", sqlang_sr_pv_get, 2 /* 1 args */, NULL }, { "getw", sqlang_sr_pv_getw, 2 /* 1 args */, NULL }, + { "gete", sqlang_sr_pv_gete, 2 /* 1 args */, NULL }, { "seti", sqlang_sr_pv_seti, 3 /* 2 args */, NULL }, { "sets", sqlang_sr_pv_sets, 4 /* 2 args */, NULL }, { "unset", sqlang_sr_pv_unset, 2 /* 1 args */, NULL }, _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev