Module: kamailio
Branch: master
Commit: 3310aa311b76d44f33cf784d20b874db259b61b2
URL: https://github.com/kamailio/kamailio/commit/3310aa311b76d44f33cf784d20b874d…
Author: Dmitri Savolainen <savolainen(a)erinaco.ru>
Committer: Dmitri Savolainen <savolainen(a)erinaco.ru>
Date: 2016-05-18T20:07:38+03:00
uac: uac.reg_refresh doc is supplemented
---
Modified: modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/3310aa311b76d44f33cf784d20b874d…
Patch: https://github.com/kamailio/kamailio/commit/3310aa311b76d44f33cf784d20b874d…
---
diff --git a/modules/uac/doc/uac_admin.xml b/modules/uac/doc/uac_admin.xml
index db5f695..b1dc06f 100644
--- a/modules/uac/doc/uac_admin.xml
+++ b/modules/uac/doc/uac_admin.xml
@@ -995,9 +995,9 @@ event_route[uac:reply] {
</title>
<para>
Load one record by l_uuid from database for remote registrations.
- If the record exists in memory, its authentication password is
- updated, otherwise a new record is added. The command has a
- parameter, which is the value of l_uuid field.
+ If the record exists in memory, its authentication password, flags
+ and proxy are updated, otherwise a new record is added.
+ The command has a parameter, which is the value of l_uuid field.
</para>
<example>
<title><function>uac.reg_refresh</function> usage</title>
Hello,
as announced earlier this morning, most of the routing blocks can be
written directly in an embedded language (right now supported being Lua
and Python). The missing blocks are (most of) the event routes.
The event route from tm for branch failure route is already supported,
as the name has to be set via t_on_branch_failure(...).
In the native configuration, event routes are executed if they are
defined. Their names (as in event_route[name]) are not valid function
names for the other programming languages to be used directly
corresponding callback function name.
I was thinking of the alternative, next are the ones I came up with,
more suggestions are welcome.
1) add parameters for event route callback names, like:
modparam("htable", "evrtcb_mod_init", "ksr_htable_mod_init")
would define the name of the function for the alternative to
event_route[htable:mod-init].
This has a benefit in speed, if the parameter is not defined, then there
is no overhead in trying to execute a callback function in an embedded
language.
The drawback is that there is need to code a bit of C to add those
parameters to the components executing event routes.
2) do a direct mapping using some translation rules, like:
- prefix with ksr_
- replace ':' and '-' with underscore '_'
So event_route[htable:mod-init] will have automatically the
correspondent function ksr_htable_mod_init().
The drawback is that each time the even route should be called, a lookup
on embedded language symbols table needs to be done to see if it exists,
then execute it.
There is still some C code to do, but less than adding parameters like
for 1).
3) like 2), but instead of an automatic translation, keep a mapping table:
struct mapping {
str kname;
str ename;
} table[] = {
str_init("htable:mod-init"),
str_init("ksr_htable_mod_init"),
}
Adding a new event route will require adding a new record in the mapping
table. The benefit is that the function name in embedded language can be
selected to be whatever, with or without ties to the event_route name.
Opinions?
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
> sha256.c: In function 'sr_SHA256_Final':
> sha256.c:613:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
> ^
> sha256.c: In function 'SHA512_Last':
> sha256.c:930:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
> ^
> sha256.c:931:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
> ^
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/626
-- Commit Summary --
* lib/srutils: fix gcc warning GH#612
-- File Changes --
M lib/srutils/sha256.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/626.patchhttps://github.com/kamailio/kamailio/pull/626.diff
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/626
>From travis gcc build https://s3.amazonaws.com/archive.travis-ci.org/jobs/129410409/log.txt
clang build https://s3.amazonaws.com/archive.travis-ci.org/jobs/129410410/log.txt
```
CC (gcc) [M corex.so] corex_mod.o
corex_mod.c: In function 'w_file_read':
corex_mod.c:352:2: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
fread(content, fsize, 1, f);
^
CC (gcc) [M corex.so] corex_rpc.o
```
```
CC (clang) [M corex.so] corex_mod.o
corex_mod.c:352:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
fread(content, fsize, 1, f);
^~~~~ ~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
```
CC (clang) [M mediaproxy.so] mediaproxy.o
mediaproxy.c:1929:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Wnon-literal-null-conversion]
*_params->param = MPInactive;
^~~~~~~~~~
1 warning generated.
```
```
CC (gcc) [L libsrutils.so.1.0] sha256.o
sha256.c: In function 'sr_SHA256_Final':
sha256.c:613:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
*(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
^
sha256.c: In function 'SHA512_Last':
sha256.c:930:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
^
sha256.c:931:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
^
LD (gcc) [L libsrutils.so.1.0] libsrutils.so.1.0
```
```
CC (gcc) [M sms.so] libsms_modem.o
libsms_modem.c: In function 'put_command':
libsms_modem.c:77:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(mdm->fd,cmd,cmd_len);
^
CC (gcc) [M sms.so] sms_funcs.o
```
```
CC (clang) [M sms.so] libsms_modem.o
libsms_modem.c:77:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
write(mdm->fd,cmd,cmd_len);
^~~~~ ~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
```
CC (gcc) [M dmq_usrloc.so] usrloc_sync.o
usrloc_sync.c: In function 'usrloc_dmq_handle_msg':
usrloc_sync.c:403:12: warning: 'reg_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.reg_id = reg_id;
^
usrloc_sync.c:401:13: warning: 'methods' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.methods = methods;
^
usrloc_sync.c:405:19: warning: 'last_modified' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.last_modified = last_modified;
^
usrloc_sync.c:394:7: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.q = q;
^
usrloc_sync.c:399:12: warning: 'cflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.cflags = cflags;
^
usrloc_sync.c:397:11: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.flags = flags;
^
usrloc_sync.c:396:10: warning: 'cseq' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.cseq = cseq;
^
usrloc_sync.c:393:13: warning: 'expires' may be used uninitialized in this function [-Wmaybe-uninitialized]
ci.expires = expires;
^
usrloc_sync.c:407:2: warning: 'action' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch(action) {
^
make[3]: 'libsrutils.so.1.0' is up to date.
```
```
CC (gcc) [M dispatcher.so] dispatch.o
dispatch.c: In function 'ds_set_attrs':
dispatch.c:263:8: warning: 'tmp_rweight' may be used uninitialized in this function [-Wmaybe-uninitialized]
int tmp_rweight;
^
make[3]: 'libkmi.so.1.0' is up to date.
```
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/612