[Kamailio-Users] openser - asterisk - methods field location table

Matteo Piazza matteo.piazza at trentinonetwork.it
Mon Nov 17 08:58:48 CET 2008


Hi Henning,

I have an error during the compilation of the module. See the text
below. As attachment the two files after the application of the pacth

Regards
Matteo


openser-1.3.3-tls# make prefix=/ modules=modules/postgres  
make[1]: Entering directory
`/usr/local/src/openser-1.3.3-tls/modules/postgres'
make[1]: Leaving directory
`/usr/local/src/openser-1.3.3-tls/modules/postgres'
make[1]: Entering directory
`/usr/local/src/openser-1.3.3-tls/modules/postgres'
Compiling db_res.c
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=prescott
-Wold-style-definition -Wmissing-field-initializers
-DMOD_NAME='"postgres"'    -DNAME='"openser"' -DVERSION='"1.3.3-notls"'
-DARCH='"i386"' -DOS='"linux"' -DCOMPILER='"gcc 4.1.2"' -D__CPU_i386
-D__OS_linux -D__SMP_yes -DCFG_DIR='"//etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
-DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H
-DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT
-I/usr/include/postgresql -c db_res.c -o db_res.o
db_res.c: In function ‘pg_convert_rows’:
db_res.c:400: error: ‘_h’ undeclared (first use in this function)
db_res.c:400: error: (Each undeclared identifier is reported only once
db_res.c:400: error: for each function it appears in.)
db_res.c: In function ‘pg_convert_row’:
db_res.c:542: error: ‘col_len’ undeclared (first use in this function)
db_res.c:502: warning: unused variable ‘row_len’
db_res.c: In function ‘pg_convert_rows’:
db_res.c:710: error: expected declaration or statement at end of input
make[1]: *** [db_res.o] Error 1
make[1]: Leaving directory
`/usr/local/src/openser-1.3.3-tls/modules/postgres'
marche:/usr/local/src/openser-1.3.3-tls# vim modules/postgres/db_


Il giorno gio, 13/11/2008 alle 17.46 +0100, Henning Westerholt ha
scritto:
> On Thursday 13 November 2008, Henning Westerholt wrote:
> > On Thursday 13 November 2008, Matteo Piazza wrote:
> > > The issue is when I restart openser, it reads the data into the database
> > > and this is the result of the openserctl ul show:
> > >
> > > Contact:: sip:s at 172.25.18.168 Q=
> > > [..]
> > > 			Methods:: 0
> > >
> > > As you can see the Methods is 0 and not 4294967295. So when I do a
> > > lookup(location) the function return as $retcode -2
> > >
> > > When the asterisk register himself the methods come back to 4294967295.
> >
> > Hi Matteo,
> >
> > ok, now i understand the problem. It seems that this is not correctly
> > restored during the loading after the restart. I did a few tests with the
> > postgres driver, it behaves a little bit different then the mysql one in
> > this case.
> 
> Hi Matteo,
> 
> i think i found the problem: the postgres module does not correctly evaluate 
> the NULL values, so the usrloc module assumed incorrectly that its a '0' 
> value, and not the ALL_METHOD flag. I already commited a fix to the trunk.
> 
> I've attached a small patch against the 1.3 branch, would be great if you 
> could test this on your installation. If this fixes the problem, i'll do the 
> backport to the 1.3 and 1.4 branch.
> 
> Cheers,
> 
> Henning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: db_res.c
Type: text/x-csrc
Size: 20374 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20081117/dc4ecf2d/attachment.c 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: db_val.c
Type: text/x-csrc
Size: 7258 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20081117/dc4ecf2d/attachment-0001.c 


More information about the Users mailing list