Re: radius accounting proxy usage

2005-11-23 Thread Stipe Tolj

Deon van der Merwe wrote:


Hi Stipe,

Yes- you are correct in your assumptions of my broken explanation of
the setup.  with parent is that there is a native RADIUS server.

I will do a build using the cvs versions of the radius code and test it again.

This is how our setup also looks (as you have it):
 APN --acct pdu-- kannel --acct pdu-- RADIUS

Please confirm for me:
- the RADIUS authentication message still go to the native RADIUS server
- only the RADIUS accounting messages are sent to my kannel server for
proxy to the real RADIUS server

For the setup with no native RADIUS to proxy too, this is my config:
group = radius-acct
secret-nas = test
our-port = 1813

For the setup with the native RADIUS server, my setup is:
group = radius-acct
secret-radius = tester1234
secret-nas = test
our-port = 1813
remote-host = 10.10.10.10
remote-port = 1813


so far ok, as far as the MD5 secrets test and tester1234 are also set on the 
APN resp. RADIUS daemon side. Which I suppose you have.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: radius accounting proxy usage

2005-11-23 Thread Stipe Tolj

Deon van der Merwe wrote:


Hi Stipe,

On 11/23/05, Stipe Tolj [EMAIL PROTECTED] wrote:


Hi Deon,

Deon van der Merwe wrote:



Hi Stipe,

Yes- you are correct in your assumptions of my broken explanation of
the setup.  with parent is that there is a native RADIUS server.

I will do a build using the cvs versions of the radius code and test it again.

This is how our setup also looks (as you have it):
 APN --acct pdu-- kannel --acct pdu-- RADIUS


yep.



Please confirm for me:
- the RADIUS authentication message still go to the native RADIUS server


this depends on your APN setup. Our Ascend MAX that we used has _two_ points in
defining the RADIUS server, one for _auth_, and one for _acct_. So it acts as
follows:

  APN --auth pdu--   RADIUS
  --acct pdu-- kannel --acct pdu--

which means the auth PDUs are directly going to the RADIUS daemon, only the acct
PDUs are proxied via kannel.



- only the RADIUS accounting messages are sent to my kannel server for
proxy to the real RADIUS server


yep.

But this has to be confired on the APN side of course.




yup- this is what is going on.  Only the accounting messages are being
sent to my kannel server.  The problem is that I do not see the
requests being forwarded to the native server.


??? aha.. will have a closer look into the log you send in later and comment.

Did you try CVS HEAD?

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: radius accounting proxy usage

2005-11-23 Thread Stipe Tolj

Deon van der Merwe wrote:


Hi Stipe,

On 11/23/05, Stipe Tolj [EMAIL PROTECTED] wrote:


yup- this is what is going on.  Only the accounting messages are being
sent to my kannel server.  The problem is that I do not see the
requests being forwarded to the native server.


??? aha.. will have a closer look into the log you send in later and comment.

Did you try CVS HEAD?




I might misunderstand the cvs head part, but this is the code that I used:
  cvs -d:pserver:[EMAIL PROTECTED]:/home/cvs login
  cvs -d:pserver:[EMAIL PROTECTED]:/home/cvs co gateway



yep, that's CVS HEAD branch then.


I used all the radius code from that checkout on the standard 1.4.0
code.  Is this correct?


drop 1.4.0 completely, CVS HEAD includes numerious fixed and is also mainly 
release candidate for 1.4.1, so you can consider it stable ;)


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: sqlbox and PostgreSQL

2005-11-23 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:


Stipe,

I tried to report the bug to http://bugs.kannel.org/ but the form  does 
not allow me to post it because there is no Category selected,  the 
thing is that Category does not show options to be selected.


Ok, actually Rene (who is the sqlbox author) was in charge to fill in the 
categories ;)


I did now, at least some of it. Can you please re-try and profile the bug 
report. Thanks in advance.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: radius accounting proxy usage

2005-11-23 Thread Stipe Tolj

Deon van der Merwe wrote:


Hi Stipe,

On 11/23/05, Stipe Tolj [EMAIL PROTECTED] wrote:


yep, that's CVS HEAD branch then.



I used all the radius code from that checkout on the standard 1.4.0
code.  Is this correct?


drop 1.4.0 completely, CVS HEAD includes numerious fixed and is also mainly
release candidate for 1.4.1, so you can consider it stable ;)




AHA.  Let me try that right now...
I have seen ome emails about config file changes... will I be able to
use the same config file with this RC 1.4.1?


mainly yes, there have been compatibility breaks, please review the ChangeLog 
for the string breaker to ensure your on the secure side.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: Message ID issues

2005-11-23 Thread Stipe Tolj

Bill Brigden wrote:


Hi,
 
I've noticed that one of the providers in an installation using kannel is

giving back big message ID's - see Bill error 2 below.. The provider is
using SMPP and using the msg id type 0x03, so hex is given in both the
submit_sm_resp and the deliver_sm. However I'm seeing problems where the
conversion of hex to string (with a bit of long integer mid way)... Below
you can see output from the logs, Ive put in 2 custom errors - bill error 1
is the tmp var (used in the dlr_add in the handle_pdu in the smpp smsc,
after conversion), and bill error 2 is the msg structure with the message
ie: pdu-u.submit_sm_resp.message_id, before conversion.
 
Has anyone ever seen this before?


2005-11-23 14:08:11 [13972] [39] DEBUG: SMPP[*-fixed-primary]: BILL
ERROR1 2147483647
2005-11-23 14:08:11 [13972] [39] DEBUG: SMPP[*-fixed-primary]: BILL
ERROR2 C2F75296041985B9


ok, sofar these are added debuging lines, right?

can you please provide more debug log-level from the SMPP communication to 
review?

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: radius accounting proxy usage

2005-11-24 Thread Stipe Tolj

Deon van der Merwe wrote:

Hi Stipe,

yup, and the cvs head version works like a absolute charm!  Thanks allot...


so the problem has been resolved via CVS HEAD version, right?

Just to confirm this.

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: whats that? [EMAIL PROTECTED]: Autoreply: Re: smtp to kannel]

2005-11-24 Thread Stipe Tolj

Wilfried Goesgens wrote:


should one get such a mail on any question?
+1 on banning that. anoying.


++1, yep, agree'ing Wilfried.

Dropped the address from all lists and informed the user about it. Also 
mentioned that if he re-subscribes he should _NOT_ use auto-replies.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: adding keywords to config file without restarting server

2005-11-28 Thread Stipe Tolj

Ehi Binitie wrote:


Hi Everyone ,
Is it possible to add keywords to config file without restarting
I’ve read through the mailing list archives and saw a mention of an auto
–reload feature .Was this ever implemented..?


no, it hasn't been yet implemented. Currently you'll have to restart smsbox at 
least to take effect on a new config.


Actually it would be great if we have a modularization towards DB support for 
this in order to set MO routing via DB entries/keywords.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: Compiling kannel 1.4 on FC3

2005-11-30 Thread Stipe Tolj

[EMAIL PROTECTED] wrote:

I'm compiling kannel version 1.4 
using gcc-3.4 and libiconv-1.9.1 on FC3


Can somebody help me on my problem?

CFLAGS='-Wall -O2 -g' ./configure --includedir=/usr/local/lib/
--libdir=/usr/include/ --disable-wap --disable-ssl

make

gcc -D_REENTRANT=1 -I. -Igw -Wall -O2 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-I/usr/include/libxml2 -o utils/seewbmp.o -c utils/seewbmp.c
gcc -D_REENTRANT=1 -I. -Igw -Wall -O2 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-I/usr/include/libxml2 -o utils/mtbatch.o -c utils/mtbatch.c
gcc -D_REENTRANT=1 -I. -Igw -Wall -O2 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-I/usr/include/libxml2 -o utils/run_kannel_box.o -c utils/run_kannel_box.c
gcc -D_REENTRANT=1 -I. -Igw -Wall -O2 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-I/usr/include/libxml2 -rdynamic -o wmlscript/wmlsc wmlscript/wmlsc.o libgw.a
libwmlscript.a libwap.a libgwlib.a -lrt -lresolv -lnsl -lm  -lpthread
-L/usr/lib -lxml2 -lz -lpthread -lm
libgwlib.a(charset.o)(.text+0x5c0): In function `charset_convert':
gwlib/charset.c:536: undefined reference to `libiconv_open'
libgwlib.a(charset.o)(.text+0x638):gwlib/charset.c:550: undefined reference to
`libiconv'
libgwlib.a(charset.o)(.text+0x643):gwlib/charset.c:551: undefined reference to
`libiconv_close'
collect2: ld returned 1 exit status
make: *** [wmlscript/wmlsc] Error 1


first of all: DO NOT cross-post to various lists. This is considered annoying.

Please provide a log of the configure run and the config.log output as 
attachement to review.


I'm having a test machine running FC3 and it does not show this strange 
behaviour.

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: Unable to start bearerbox - serious error

2005-12-08 Thread Stipe Tolj

Alexander Malysh wrote:


Hi,

kannel still has some 64bit issues yet. Please either try cvs head and 
report whether it works for you or compile with -m32 gcc flag.


have we a profile regarding the 64bit issues for cvs version?

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



[FYI] OMA ProvCont OTA support added

2005-12-08 Thread Stipe Tolj

Hi list,

just commited a patchset developed by Paul Bagyenda and Paul P Komkoff Jr for 
supporting the official WAP 2.0 protocol stack specification OMA ProvCont via 
SMS bearer.


Please try and report issues via http://bugs.kannel.org/ or via the list.

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---




Re: NAS/RAS--RADIUS

2005-12-08 Thread Stipe Tolj

Rajesh wrote:


Hi all,
I am pretty aware of Proxy RADIUS setup in kannle gateway.
But my doubt is if we need to say only these NAS /RAS servers should requests 
to Proxy or RADIUS servers where can we specify that .
For example my requirement is only allow particular I.P 's to send RADIUS 
packets to Proxy /RADIUS servers, where i have to mention that???.
I feel it is bit related to NAS/RAS routing to RADIUS servers.
Can any body give me thought on this ???


now, as far as I understand you, it's about restructing access to Kannel's 
RADIUS proxy, right?


The NAS/RAS sends UDP datagrams to Kannel's wapbox instance and Kannel forwards 
them (if desired) to the RADIUS server.


Actually we could define which IPs are allowed to inject RADIUS PDUs to 
wapbox, but that does not make sense to me, since you have already 2 security 
options to use:


  a) the iptables/firewall rules: simply allow only the NAS/RAS source IPs to 
reach the UDP port of Kannel's RADIUS proxy.


  b) even while someone within the physical network, which is able to reach 
your Kannel wapbox via UDP datagrams, he/she (as a foo) would not know the 
MD5-secret that is used to authenticate the RADIUS acct PDUs.


So b) is actually the most basic mechanism, but does not prevent from DOS 
attacking. a) and b) in combination, including an additional item c) network 
architecutre layout are the state-of-the-art way to approach for this.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: soap module

2005-12-08 Thread Stipe Tolj

francesco emmi wrote:

Hi Oded,

I would like to try your soap module. I suppose it is necessary to patch
the gateway code in order to make it work (it doesn't work as it is in
stable kannel release 1.4.0). Please may you email me necessary patches?

I really appreciate if you would give me some tips about how to use it
or some example of XML end specs files

thanks in advance


Hi Oded,

this is a good point... we don't have the required .xml .spec files within 
Kannel's cvs. I guess these are subject to the specific XML language. So they 
may vary. But it would be great to have at least one incarnation of those to put 
into doc/examples.


Anyone of you guys can forward me those?!

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: [Fwd: [Kannel 0000278]: cannot build kannel with mysql support]

2005-12-11 Thread Stipe Tolj

Rene Kluwen wrote:


This bug can be solved by applying the sqlbox patch.


??? how did you know that?, I can see any particular log from the report that 
indicates what is going wrong here ;)


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: [Fwd: [Kannel 0000278]: cannot build kannel with mysql support]

2005-12-12 Thread Stipe Tolj

Rene Kluwen wrote:


Rene Kluwen wrote:



This bug can be solved by applying the sqlbox patch.


??? how did you know that?,



Because I am smart :)...
And also because I always have a problem compiling mysql on a clean checkout.


now, agree'ing to both ;)

What are the specific problems for compiling mysql support, can you guys please 
profile bugs reports, so we have a track on this.


Thanks.

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: [Fwd: [Kannel 0000278]: cannot build kannel with mysql support]

2005-12-12 Thread Stipe Tolj

Ehi Binitie wrote:


Hi,
Could you provide a little more information on  how to do this .
I'm a linux newbie. I ran a query on my rpm but didn’t find any useful
information on how the libraries were compiled.


now, run

  $ ldd bearerbox

so check if your bearerbox has been linked against the mysql client library. If 
you don't see any mysql related thing there, you probably sitting on a bearerbox 
_without_ compiled-in mysql support.


Then you're obviously would be best to compile on your own, which is straight 
forward.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: [Fwd: Re: [Fwd: [Kannel 0000278]: cannot build kannel with mysql support]]

2005-12-12 Thread Stipe Tolj

Rene Kluwen wrote:


 Mensaje original 
Asunto: Re: [Fwd: [Kannel 278]: cannot build kannel with mysql
support] De: Rene Kluwen [EMAIL PROTECTED]
Fecha:  Mar, 13 de Diciembre de 2005, 0:52
Para:   Peter Christensen [EMAIL PROTECTED]
--

# CFLAGS=-I/usr/include/mysql ./configure --with-mysql
--with-mysql-dir=/usr

snip

Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.56
checking mysql libs... -L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl
-lm checking for mysql_init in -lmysqlclient... no
configure: error: Unable to find MySQL client libraries


hmmm, now, this is my result:

Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.49
checking mysql libs... -L'/usr/lib' -lmysqlclient -lz -lcrypt -lnsl -lm
checking for mysql_init in -lmysqlclient... yes
checking mysql includes... -I'/usr/include/mysql'
checking for mysql/mysql.h... yes
checking for mysql/mysql_version.h... yes
checking whether to compile with MySQL support... yes
checking whether to compile with LibSDB support... disabled
checking whether to compile with SQLite support... disabled
checking whether to compile with SQLite3 support... disabled
checking whether to compile with Oracle support... disabled
checking whether to compile with PostgresSQL support... disabled


so there is some other lib dependancy not fitting here for you? Would be good to 
have a peak into config.log to see what we deal with?!


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: [Fwd: Re: [Fwd: [Kannel 0000278]: cannot build kannel with mysql support]]

2005-12-12 Thread Stipe Tolj

Rene Kluwen wrote:


 Mensaje original 
Asunto: Re: [Fwd: [Kannel 278]: cannot build kannel with mysql
support] De: Rene Kluwen [EMAIL PROTECTED]
Fecha:  Mar, 13 de Diciembre de 2005, 0:52
Para:   Peter Christensen [EMAIL PROTECTED]
--

# CFLAGS=-I/usr/include/mysql ./configure --with-mysql
--with-mysql-dir=/usr

snip

Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.56
checking mysql libs... -L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl
-lm checking for mysql_init in -lmysqlclient... no
configure: error: Unable to find MySQL client libraries



hmmm, now, this is my result:

Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.49
checking mysql libs... -L'/usr/lib' -lmysqlclient -lz -lcrypt -lnsl -lm
checking for mysql_init in -lmysqlclient... yes
checking mysql includes... -I'/usr/include/mysql'
checking for mysql/mysql.h... yes
checking for mysql/mysql_version.h... yes
checking whether to compile with MySQL support... yes
checking whether to compile with LibSDB support... disabled
checking whether to compile with SQLite support... disabled
checking whether to compile with SQLite3 support... disabled
checking whether to compile with Oracle support... disabled
checking whether to compile with PostgresSQL support... disabled


so there is some other lib dependancy not fitting here for you? Would be good to 
have a peak into config.log to see what we deal with?!


Stipe


mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: Is the validity period supported for smpp

2005-12-13 Thread Stipe Tolj

Hillel wrote:


Dear Kannel devel,

I'm using Kannel CVS from 20051119
Does the validity period work? If so how?

Any help appreciated

In my configuration I have:

group = smsc
smsc = smpp
..
validityperiod = 4320


actually this config directive was not active for smpp smsc groups, it was 
active for 'ois' and 'at' smsc type.


As Adi stated, you are able to define a message specific validity time via the 
sendsms HTTP interface (smsbox side).


Actually as this would go also with a global value for the smsc group, I have 
added this feature to cvs, see ChangeLog entry:


2005-12-14  Stipe Tolj  stolj at kannel.org
  * doc/userguide/userguide.xml: added 'validityperiod' to SMPP section.
  * gw/smsc/smsc_smpp.c: added 'validityperiod' handling inside smsc
group. This now allows general validity period setting inside the smpp
smsc group. Priority order is: message specific value given via sendsms
interface and then smsc config value.
Thanks to Hillel [EMAIL PROTECTED] for this idea.
[Msg-Id: [EMAIL PROTECTED]]

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



[RFC] gw/smsc/smsc_smpp.c commit to revision 1.85 (amalysh)

2005-12-22 Thread Stipe Tolj

Hi Alex,

just reviewing your commit and I have some questions I'd like to hear comments 
;)

* you safe an empty function to dump_pdu() via a #define that does a useless 
do loop. Has this been profiled via assembler generation that it is really a 
benefit against the existing version? Could do some quick tests on this.


* prototype for handle_dlr() changed in the sense that you pass the Octstr 
pointer et all to the function and not the SMPP_PDU pointer itself? Why? Makes 
the function prototype horrible long IMO.


* everyting else seems straight forward to me ;)

I'm not veto'ing, just want to hear about the conceptual ideas you have/had 
for the above two point.


Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---




Re: Bug as User's Guide and Code no in sync

2005-12-26 Thread Stipe Tolj

Hillel wrote:


Dear Kannel Devel,

If you look at:
 http://kannel.org/download/kannel-userguide-snapshot/userguide.html

group = mysql-connection
id = dlr-db
host = localhost
mysql-username = foo
mysql-password = bar
database = dlr
max-connections = 1

This does not work according to the user guide unless you remove the mysql
prefix:
username = foo
password = bar

If you manually run the bearerbox this is what you see on the console:
2005-12-26 11:02:31 [3079] [0] ERROR: Group 'mysql-connection' may not
contain field 'mysql-username'.

Please either change the code or the user guide to be in sync.


yep, this was my fault... while I changed the values to reflect a more generic 
syntax over all DB types, I missed to update the relevant user guide section.


Done this in cvs, see ChangeLog:

2005-12-26  Stipe Tolj  stolj at kannel.org
  * doc/userguide/userguide.xml: fixing documentation references for the
change from 'mysql-[username|password]' to '[username|password]' in the
'mysql-connection' group. Thanks to Hillel [EMAIL PROTECTED]
for pointing to this missed issue.
[Msg-Id: [EMAIL PROTECTED]]

thanks a lot.

Stipe

mailto:stolj_{at}_wapme-group.de
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
---



Re: Trouble getting Billing Information and/or Account Info in DLR-Reports

2006-01-06 Thread Stipe Tolj

M Amedeo Alaimo wrote:


Dear Devel,

So far I am new to kannel, and like it very much.  The dlr escape codes are
giving me problems; however.
I believe the billing information would be %B and the account information
would be %o, and that these two variable can only be seen
on an incomming message.

my group for the smpp sms service i am testing looks like this:
group = sms-service
keyword = notest
#text = testing
exec = /usr/local/kannel/bin/notest.pl MSN=%p FROM=%P time=%t message=%a
udh=%u
 smsc=%i coding=%c smsc-id=%I smscReply=%A billing=%B account=%o
serviceName=%n
dlr-type=%d

I get all values printing in my log file except udh billing and account.
I also have come to believe that msg-id-type plays an issue in this.
right now it is set at 0x03 which is hex for both deliver_sm and
submit_sm_resp
my provider sends me these variables in hex, so i think this is correct.

Can someone help on the issue please.  Also please reply to my email
address, i believe i am not receivin the devel messages anymore.


can you drop us the bearerbox.log in order to have a peek into the SMPP PDUs?!

Please attach as log to the mail.

Stipe



Re: Recieving SMS with get-url question

2006-01-06 Thread Stipe Tolj

Andreas Fink wrote:

this means you received an SMS sent from a subscriber to your short  ID. 
Kannel is forwarding the request to the configured url and is  done with 
it. The Website does not send a reply to it or the reply is  denied by 
the config so no answer is being sent back.


yep, I guess this is the cause:

within your 'sms-service' group you may have:

  max-messages = 0

which means, forward the message via HTTP to the configured 'get-url' but don't 
transport the HTTP server reply back via the SMSC channel to the mobile.


Stipe



Re: Problem to setting throughput value for SMSC group

2006-01-06 Thread Stipe Tolj

vinodkumar wrote:


hai,

I am in a position to control the throughput level of particular SMSC
connectivity. I found a way from kannel document suggests to use the
variable throughput. Even though i am setting that value as 5, but it
delivering more than five to the SMSC. I tested this scenario with SMSC
simulators and i found the simulator received nearly 11 requests. 


Following is the smsc group configuration.

group = smsc
smsc-id = VINOD-SMSC
allowed-smsc-id = VINOD-SMPP
smsc = smpp
host = 192.0.400.00
port = 
smsc-username = vinod
smsc-password = vinod
system-type = VMA
address-range = 
transceiver-mode = 1
interface-version = 34
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
keepalive = 25
log-level = 0
throughput=5
log-file = /home/log/kannel/vinod-smsc.log

Please guide me to sought out this issue.


can you please attach the log you have specified there in order to see what 
happens?

Which Kannel version are you using?

Stipe



Re: configure ok but command make ko

2006-01-06 Thread Stipe Tolj

Vincent CHAVANIS wrote:


Dear,

Maybe you should try to install the kerberos devel libs

/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
^^


yep, agree'ing with Vincent here.

Obviously yur local openssl setup was build with kerberos support, but the 
required devel headers and libs are not present on your box.


Either try to resolve the issue by installing kerberos packages (depending on 
your OS distro), or re-compile openssl on your own and use the own openssl 
installatin on the box.


Stipe



test-mail, please ignore

2006-01-09 Thread Stipe Tolj

Stipe



Re: Kannel CVS and FreeBSD 6

2006-01-09 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:

I'm having this problem with Kannel CVS (20060109) and FreeBSD 6.0  
RELEASE on AMD64


[EMAIL PROTECTED] smsbox smskannel.conf
2006-01-09 10:09:25 [7821] [0] INFO: Debug_lvl = -1, log_file =  none, 
log_lvl = 0

Bus error: 10 (core dumped)

smskannel.conf is the example file in cvs. The source code compiled  
without problems.


Is there any compatibility problem with FreeBSD 6 and/or AMD64?


can you provide a backtrace via gdb for the core dump?

Stipe



Re: Kannel 1.4.1?

2006-01-09 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:


Is there any date planned for the release of Kannel 1.4.1?


was scheduled for this weekend... and is still scheduled for this week.

We have a major issue with the WTP-SAR stack, and I'm after this.

Stipe



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-09 Thread Stipe Tolj

Vincent CHAVANIS wrote:


Dear,

I've noticed today that field_dst is not implemented in DLR for mysql and pgsql.
If a DLR arrives with the same TS as another one on a same SMSC, kannel will 
not be able to update the correct one

Here is a patch tested and in production status, maybe should be commited to CVS


Hi Vincent,

yep, ++1 here. Commited to CVS.

A kind request, please do not cross-post to both lists, and we'd prefer 'diff 
-u' format patches ;)


Stipe


--
Für weitere Fragen stehe ich Ihnen gerne telefonisch
oder via E-Mail zur Verfügung.

Mit freundlichen Grüßen


Stipe Tolj
OSS System Architect

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-10 Thread Stipe Tolj

Alexander Malysh wrote:


Hi Stipe,

why did you commit this pacth w/o waiting a bit for comments?

such patch was already discussed few times and we did not found solution 
yet. I'm -1 for this patch because it will break too many installations.
For short explanation why -1: if you sent destination 00491234567 but 
SMSC returns 01234567 as destination (IIRC this is the case T-Mobile 
germany UCP server) then you will not find DLR in the DB. For a longer 
explannation seek in ML archives for discussion about it.


Please revert it or I will do it.


yep, agree'ing here...

I guess this is why Kannel-NG used the stripping way for the destination number, 
right?


I'll revert, since you're obvious right here...

How about the variant with the 10 digit strip for the last digit?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-10 Thread Stipe Tolj

Vincent CHAVANIS wrote:


All right alex, i will not waste your time anymore
on a topic that have been already discussed :)


Hi Vincent,

no problem, we appritiate your contribution in either form, patches _and_ 
discussions.


But Alex seems right here. Actually you both are right in some sense. But we 
need to revert to the old state in order not to break things. Then we need to 
evolve to a concept that solves your (and most likely other people's issue).


@Alex: patchset for that MNC conect?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Kannel 1.4.0 Major Issue

2006-01-10 Thread Stipe Tolj

Amol Patwardhan wrote:


Hi Alex,

Sorry, I am not very good at CVS. Although the kannel version I downloaded
about 3 months back via CVS (I followed instructions on website)
You suggest I do that again to download the latest CVS version?

On more thing, since kannel did not implement the data_sm PDU type (SMPP
3.4), we were facing severe problems.
I had to write my own patch code. I have attached the C file for that.
(Please check my name Amol to find it out).
The code is working fine for me on production setup. Can you provide verify
it and make it as patch for all of us.

Currently, I guess I have to download via CVS and again apply the data_sm
patch.


Hi Amol,

please use either instructions on

 http://www.kannel.org/download.shtml

for pulling a CVS HEAD version, or grep our nightly snapshot build out of CVS 
HEAD at


 http://www.kannel.org/download/kannel-snapshot.tar.gz

If the problem you reported initially still remains, please do profile also a 
bug report in our bug tracking system http://bugs.kannel.org/


Stipe


--
Für weitere Fragen stehe ich Ihnen gerne telefonisch
oder via E-Mail zur Verfügung.

Mit freundlichen Grüßen


Stipe Tolj
OSS System Architect

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: dlr_mysql_add and internal charset

2006-01-10 Thread Stipe Tolj

Peter Christensen wrote:


Hi,

I'd like to address a couple things now that a new kannel release near:


1. Some while ago, I reported problems within the dlr_mysql_add 
function. If the entry-timestamp, entry-source, or entry-url contains 
some unfortunate characters (most significantly '), the SQL query gets 
broken and the DLRs are wasted.
After a while, the first patch was submitted, but as it used 
mysql_real_escape_string, it would potentially require an additional 
MySQL connection (or something - don't remember what the exact problem 
was), so it was not committed, and another patch was promised in a near 
future. Apparently this patch never came, however, and I see that the 
current CVS is still not escaping the strings.


correct, I have that escaping version of mysql here and it's scheduled for 
commit to 1.5.0 devel, since I won't have the time to test it that extensively 
to ensure stability for 1.4.1 stable.


Any thoughts on this?

I could post the patch and let the list confirm via votes that it should or 
should not go to 1.4.1 stable?


So, question is: What is the cause of the delay, and are you interested 
in my own patch, which uses mysql_escape_string instead of 
mysql_real_escape_string?


The cuase is lack in tme... at least from my side... I'm pushing, but I have 
several construction sides at Kannel side, including the more important 
WTP-SAR issue.


If you have ready code for that post to the mailing list. I will do the same, so 
 we can leaverage work time.


I admit that problems related to this is somewhat rare (most likely 
cause for errors would be an SMS with ' in the originator string), but 
since it can be fixed relatively easy, I see no reason why NOT to do it. 
Although mysql_escape_string does not look at the character set (unlike 
mysql_real_escape_string), I still believe that it will be better to use 
it than to do nothing.


absolutely agree'ing... following the main strategy: stability and safe.

2. I've noticed that the charset_gsm_to_latin1 and charset_latin1_to_gsm 
functions actually uses windows-1252 as character set, but at least the 
SMPP gateway uses iso-8859-1 internally, which practically removes 
support for the € (euro) sign. This is probably also a problem within 
other gateways. If interesseted, I can supply a patch.


yep... Please comment the patch in detail, so that anyone of us who is reviewing 
has an easier job.


But in relation to that, there is one thing which have begun to annoy 
me. By restricting to the windows-1252 character set when transmitting 
with the GSM character set, you remove support for the 10 Greek 
characters which is support by GSM. And as it always is when something 
is potentially possible, there will always be some large annoying 
customer who wants support for that particular feature.
This last bit is only an observation and nothing more. I realize that 
fixing this (preferable by using UTF-8 or UCS-2BE as internal character 
set regardless of the output character set), would require a 
significantly amount of recoding within almost every part of the kannel 
software package.


yep.

The reason while I have not attached any patches to this mail (although 
I have made quite a few changes), is that my own patch is really a 
combination of several patches, which is not in sync with the CVS. But 
if people are interested, I will update the patch and post the relevant 
bits.


yes, please try to keep clean logical patchsets. Which means one patchset = one 
logical change. It's too hard to trace several issues in just one single patchset.



The whole patch does the following:
 SMPP:
  * Add support for mBlox operator and billing identifier (Not my own work)
  * Add support for ALL SMPPv5 error codes, including mBlox specific 
codes. (That is, recognize them and translate to human readable text)

  * Use CP1252 instead of ISO-8859-1 as internal charset
  * Added pack_udh parameter. When set, messages are sent as packed GSM 
data when UDH is present. (A few gateways require this)


 MySQL:
  * Escapes strings in dlr_mysql_add

 run_kannel_box:
  * Added waitpid after kill to avoid false terminations (the init 
scripts reports that kannel is terminated, while bearerbox is actually 
stuck within a connect call. - happens relatively often). With later CVS 
releases this didn't seem to work, so instead I've added some 
functionaly to the init script instead.


Stipe


--
Für weitere Fragen stehe ich Ihnen gerne telefonisch
oder via E-Mail zur Verfügung.

Mit freundlichen Grüßen


Stipe Tolj
OSS System Architect

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-11 Thread Stipe Tolj

Alexander Malysh wrote:


P.S. I find MNC's solution acceptable too but it need more user 
configuration.


yep, I like the idea in it's base too, since it assumes that Kannel does has 
it's own MSISDN format scheme, which we should have actually.


But I dislike the fact that user's may forget to use the unified-prefix within 
the smsc groups and also that they are not aware of the fact they would need one.


So, I'd go first for Alex's way in stripping away everything that seems 
logically to be country code or/and prefix, reducing the probability that the 
same base MSISDN number is transported via the same smsc-id in the same 
timestamp very drastically for various country/network code variations.


This is still no perfect solution IMO. Since it's still not fully fail safe.

We'd need a policy within Kannel internally what MSISDN scheme we apply. The 
user should BE AWARE that he has to modify the unified-prefix (and regex) rules 
that way, that everything that enters bearerbox abstracted layer is in Kannel 
internal MSISDN scheme.


This will definetly more discussion and conceptual brain...

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



[RFC] DLR MSISDN handling: smsc-id normalization vs. base part stripping

2006-01-11 Thread Stipe Tolj

Hi list,

ok, we have currently 2 approachs in solving the issue that Vincent presented 
to the table again in his mail:


  Subject: [PATCH] DLR with field_dst not supported in Mysql/Pgsql
  Msg-Id: [EMAIL PROTECTED]

concerning the fact that DLR lookups and manipulations are not done in the DLR 
repository space due to the fact that SMPP may return a different MSISDN scheme 
in DLR reports.


The approaches (in order of historical appearance ;)

1) Alex's approach to strip away the country and network part. Hence the string 
that is used for the SQL statements will remain the base MSISDN number of the 
mobile. Something like this:


  strip = (octstr_len(dst)  10 ? octstr_len(dst) - 10 : (octstr_len(dst)  7 ? 
octstr_len(dst) - 7 : 0));


and then use

  sql = octstr_format(SELECT ... FROM %s WHERE ... AND %s like '%%%s';,
  ..., octstr_get_cstr(dst)+strip);

This does work. But it's not fail safe. The probability that we run into 
collisions is drastically reduced.


2) Oliver's approach to use smsc-id level normalization via 'unified-prefix' 
config directives. For the patch see


  Msg-Id: [EMAIL PROTECTED]


Votes for the approaches? Opinions please.

Personally, I like 2) but I admit I agree to Alex in the more user 
configuration is bad comment. A user that is not aware of the implication that 
he has to handle MSISDN normalization for the DLR lookup handling (even while we 
could dedicate a user's guide section to this) will run into errors, even while 
he wouldn't too.


I guess there is no full automatic way in normalizing MSISDN schemes as used in 
the real world.


I'd like to go for approach 1) at first step. This has been tested in extends 
and would also go into 1.4.1 stable.


Option 2) and further conceptional considerations could lead us to a even better 
and hopefully totally fail safe solution.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---




Re: dlr_mysql_add and internal charset

2006-01-11 Thread Stipe Tolj

Alexander Malysh wrote:


diff -Nru gateway/gw/dlr_mysql.c gateway.new/gw/dlr_mysql.c
--- gateway/gw/dlr_mysql.c2006-01-10 13:53:29.0 +0100
+++ gateway.new/gw/dlr_mysql.c2006-01-10 16:05:29.0 +0100
@@ -140,9 +140,38 @@
 dlr_db_fields_destroy(fields);
 }
 
+char *_mysql_escape_string(const char *string) {



please fix coding style:
funct_name(...)
{
 ...
}


yep, please refer to gateway/doc/CodingStyle to our general style ;)




+unsigned long int size, length;
+char *buffer;
+length = strlen(string);
+size = (strlen(string)  1) + 1;
+if ((buffer = (char *)gw_malloc(size)) == NULL) {
+error(0, MYSQL: Error allocating buffer for string);
+return NULL;
+}
+else {
+mysql_escape_string(buffer, string, length);
+return buffer;
+}
+}
+



please fix coding style: indentation are 4 spaces.


no TAB please, since it's interpreted by different editors with different 
length.

Sorry that Alex and I pick about the coding style issue.. BUT, when we commit 
patches that are more then simply a couple of lines (where we can and do correct 
coding style issues), it's really a pain to reformat such a huge patch by hand. 
That's the reason. Hope this can be acceptable.



patch looks good. Please fix coding style and it could go into cvs.
Ahh I think you missing update/select case. Unescaped values could also 
break update/select statements.


same for me,... I'll digg on my approach for this and post it to the list also 
as a oponent to this. AFAIR, I had a way in reducing the ammound of code changes.





diff -Nru gateway/gw/smsbox.c gateway.new/gw/smsbox.c
--- gateway/gw/smsbox.c2005-12-09 03:14:31.0 +0100
+++ gateway.new/gw/smsbox.c2006-01-10 15:57:05.0 +0100
@@ -3654,9 +3654,9 @@
 
 if (coding == DC_7BIT) {

 /*
- * For 7 bit, convert to ISO-8859-1
+ * For 7 bit, convert to CP1252
  */
-if (octstr_recode (octstr_imm (ISO-8859-1), charset, body) 
 0) {

+if (octstr_recode (octstr_imm (CP1252), charset, body)  0) {
 resultcode = -1;
 }
 } else if (coding == DC_UCS2) {
diff -Nru gateway/gw/smsc/smsc_smpp.c gateway.new/gw/smsc/smsc_smpp.c
--- gateway/gw/smsc/smsc_smpp.c2005-12-18 21:21:16.0 +0100
+++ gateway.new/gw/smsc/smsc_smpp.c2006-01-10 15:58:41.0 
+0100

@@ -78,6 +78,8 @@
 #include sms.h
 #include dlr.h
 
+#define SMPP_CHARSETCP1252

+
 /*
  * Select these based on whether you want to dump SMPP PDUs as they are
  * sent and received or not. Not dumping should be the default in at 
least

@@ -490,9 +492,9 @@
  * unless it was specified binary, ie. UDH indicator was 
detected

  */
 if (smpp-alt_charset  msg-sms.coding != DC_8BIT) {
-if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), ISO-8859-1) != 0)
+if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), SMPP_CHARSET) != 0)
 error(0, Failed to convert msgdata from charset 
%s to %s, will leave as is.,
- octstr_get_cstr(smpp-alt_charset), 
ISO-8859-1);
+ octstr_get_cstr(smpp-alt_charset), 
SMPP_CHARSET);

 msg-sms.coding = DC_7BIT;
 } else { /* assume GSM 03.38 7-bit alphabet */
 charset_gsm_to_latin1(msg-sms.msgdata);
@@ -640,9 +642,9 @@
  * unless it was specified binary, ie. UDH indicator was 
detected

  */
 if (smpp-alt_charset  msg-sms.coding != DC_8BIT) {
-if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), ISO-8859-1) != 0)
+if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), SMPP_CHARSET) != 0)
 error(0, Failed to convert msgdata from charset 
%s to %s, will leave as is.,
- octstr_get_cstr(smpp-alt_charset), 
ISO-8859-1);
+ octstr_get_cstr(smpp-alt_charset), 
SMPP_CHARSET);

 msg-sms.coding = DC_7BIT;
 } else { /* assume GSM 03.38 7-bit alphabet */
 charset_gsm_to_latin1(msg-sms.msgdata);
@@ -845,10 +847,10 @@
 /*
  * convert to the given alternative charset
  */
-if (charset_convert(pdu-u.submit_sm.short_message, 
ISO-8859-1,
+if (charset_convert(pdu-u.submit_sm.short_message, 
SMPP_CHARSET,
 octstr_get_cstr(smpp-alt_charset)) 
!= 0)
 error(0, Failed to convert msgdata from charset %s 
to %s, will send as is.,
- ISO-8859-1, 
octstr_get_cstr(smpp-alt_charset));
+ SMPP_CHARSET, 
octstr_get_cstr(smpp-alt_charset));

 }
 }
 



I have no strong opinion 

Re: dlr_mysql_add and internal charset

2006-01-11 Thread Stipe Tolj

Alexander Malysh wrote:


diff -Nru gateway/gw/dlr_mysql.c gateway.new/gw/dlr_mysql.c
--- gateway/gw/dlr_mysql.c2006-01-10 13:53:29.0 +0100
+++ gateway.new/gw/dlr_mysql.c2006-01-10 16:05:29.0 +0100
@@ -140,9 +140,38 @@
 dlr_db_fields_destroy(fields);
 }
 
+char *_mysql_escape_string(const char *string) {



please fix coding style:
funct_name(...)
{
 ...
}


yep, please refer to gateway/doc/CodingStyle to our general style ;)




+unsigned long int size, length;
+char *buffer;
+length = strlen(string);
+size = (strlen(string)  1) + 1;
+if ((buffer = (char *)gw_malloc(size)) == NULL) {
+error(0, MYSQL: Error allocating buffer for string);
+return NULL;
+}
+else {
+mysql_escape_string(buffer, string, length);
+return buffer;
+}
+}
+



please fix coding style: indentation are 4 spaces.


no TAB please, since it's interpreted by different editors with different 
length.

Sorry that Alex and I pick about the coding style issue.. BUT, when we commit 
patches that are more then simply a couple of lines (where we can and do correct 
coding style issues), it's really a pain to reformat such a huge patch by hand. 
That's the reason. Hope this can be acceptable.



patch looks good. Please fix coding style and it could go into cvs.
Ahh I think you missing update/select case. Unescaped values could also 
break update/select statements.


same for me,... I'll digg on my approach for this and post it to the list also 
as a oponent to this. AFAIR, I had a way in reducing the ammound of code changes.





diff -Nru gateway/gw/smsbox.c gateway.new/gw/smsbox.c
--- gateway/gw/smsbox.c2005-12-09 03:14:31.0 +0100
+++ gateway.new/gw/smsbox.c2006-01-10 15:57:05.0 +0100
@@ -3654,9 +3654,9 @@
 
 if (coding == DC_7BIT) {

 /*
- * For 7 bit, convert to ISO-8859-1
+ * For 7 bit, convert to CP1252
  */
-if (octstr_recode (octstr_imm (ISO-8859-1), charset, body) 
 0) {

+if (octstr_recode (octstr_imm (CP1252), charset, body)  0) {
 resultcode = -1;
 }
 } else if (coding == DC_UCS2) {
diff -Nru gateway/gw/smsc/smsc_smpp.c gateway.new/gw/smsc/smsc_smpp.c
--- gateway/gw/smsc/smsc_smpp.c2005-12-18 21:21:16.0 +0100
+++ gateway.new/gw/smsc/smsc_smpp.c2006-01-10 15:58:41.0 
+0100

@@ -78,6 +78,8 @@
 #include sms.h
 #include dlr.h
 
+#define SMPP_CHARSETCP1252

+
 /*
  * Select these based on whether you want to dump SMPP PDUs as they are
  * sent and received or not. Not dumping should be the default in at 
least

@@ -490,9 +492,9 @@
  * unless it was specified binary, ie. UDH indicator was 
detected

  */
 if (smpp-alt_charset  msg-sms.coding != DC_8BIT) {
-if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), ISO-8859-1) != 0)
+if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), SMPP_CHARSET) != 0)
 error(0, Failed to convert msgdata from charset 
%s to %s, will leave as is.,
- octstr_get_cstr(smpp-alt_charset), 
ISO-8859-1);
+ octstr_get_cstr(smpp-alt_charset), 
SMPP_CHARSET);

 msg-sms.coding = DC_7BIT;
 } else { /* assume GSM 03.38 7-bit alphabet */
 charset_gsm_to_latin1(msg-sms.msgdata);
@@ -640,9 +642,9 @@
  * unless it was specified binary, ie. UDH indicator was 
detected

  */
 if (smpp-alt_charset  msg-sms.coding != DC_8BIT) {
-if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), ISO-8859-1) != 0)
+if (charset_convert(msg-sms.msgdata, 
octstr_get_cstr(smpp-alt_charset), SMPP_CHARSET) != 0)
 error(0, Failed to convert msgdata from charset 
%s to %s, will leave as is.,
- octstr_get_cstr(smpp-alt_charset), 
ISO-8859-1);
+ octstr_get_cstr(smpp-alt_charset), 
SMPP_CHARSET);

 msg-sms.coding = DC_7BIT;
 } else { /* assume GSM 03.38 7-bit alphabet */
 charset_gsm_to_latin1(msg-sms.msgdata);
@@ -845,10 +847,10 @@
 /*
  * convert to the given alternative charset
  */
-if (charset_convert(pdu-u.submit_sm.short_message, 
ISO-8859-1,
+if (charset_convert(pdu-u.submit_sm.short_message, 
SMPP_CHARSET,
 octstr_get_cstr(smpp-alt_charset)) 
!= 0)
 error(0, Failed to convert msgdata from charset %s 
to %s, will send as is.,
- ISO-8859-1, 
octstr_get_cstr(smpp-alt_charset));
+ SMPP_CHARSET, 
octstr_get_cstr(smpp-alt_charset));

 }
 }
 



I have no strong opinion 

Re: files installed?

2006-01-11 Thread Stipe Tolj

massimiliano fratoni wrote:


Please help me!

I launch configure and make command, at end installation i not found the 
configuration files!?

Where are they?

Massimiliano Fratoni


Hi Massimiliano,

I don't want to sound to harsh, but this should be a questiokn to the 
users@kannel.org list rather than the devel@ list :)


Now, did you read the user's guide? It's provided via our web site... it does 
contain a lot of usefull information, and we titled it user's guide... I don't 
know how better the naming could habe been ;)


There are sample configs

  $ cd gateway/gw
  $ ls smskannel.conf wapkannel.conf


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Kannel on Mac OS X 10.4

2006-01-12 Thread Stipe Tolj

Aarno Syvänen wrote:


Yep. there is two things to do:
a) either you remove flags arch flags, then Kannel will be compiled  for 
your machine:

b) you tell compiler to look libgcc from the right place:
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk

Please tell if this works. It would be good to fix this before  the  new 
release.


yup, since you're closer to the boxes Aarno, could you send either patchset or 
commit on your own?


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [Kannel-Devel] Re: please reconsider the +0 you gave the patches

2006-01-12 Thread Stipe Tolj

Peter Beckman wrote:


On Thu, 12 Jan 2006, Peter Christensen wrote:


Hi,

Apparently the patch was not as self-explanatory as I expected (or my 
English is poor :p)...


The cp1252 patch break absolutely nothing, as far as I see. It does 
change default charset from being ISO-8859-1 to WINDOWS-1252.



Does it fix this error?  This is 1.3.2 though, so it may be fixed in 1.4.0.

2006-01-11 14:13:13 [41542] [7] ERROR: Failed to convert msgdata from
charset ISO-8859-1 to ISO-8859-1, will leave as is.


???

now, I'd say that's really a hard convertion

1.3.2 is really out of scope... CVS HEAD should have this fixed.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-12 Thread Stipe Tolj

Aarno Syvänen wrote:


Hi List,

Current configure does *not* work with Mac at all. So i use following  
instead:


Index: configure.in
===
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.155
diff -r1.155 configure.in
157,158d156
 AC_CHECK_LIB(c_r, pthread_exit, [LIBS=$LIBS -lc_r;  pthread=yes])
 AC_CHECK_LIB(kse, pthread_exit, [LIBS=$LIBS -lkse;  pthread=yes])
203a202,203
  AC_SEARCH_LIBS([pthread_exit], [c_r], [pthread=yes])
  AC_SEARCH_LIBS([pthread_exit], [kse], [pthread=yes])
214c214,229
 AC_CHECK_HEADERS(sys/socket.h sys/sockio.h net/if.h netinet/in.h)
---
  AC_CHECK_HEADERS([sys/socket.h])
  AC_CHECK_HEADERS([net/if.h], [], [],
   [#include stdio.h
#if STDC_HEADERS
# include stdlib.h
# include stddef.h
#else
# if HAVE_STDLIB_H
#  include stdlib.h
# endif
#endif
#if HAVE_SYS_SOCKET_H
# include sys/socket.h
#endif
])
  AC_CHECK_HEADERS(sys/sockio.h netinet/in.h)

Does anybody object me committing this change. It is, does break some  
other os.


speaking from the formality level first... 'diff -u' format is the one we 
appritiate in the list ;))


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-12 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:



This is for the first warning:

   gcc -D_REENTRANT=1 -I. -Igw  -DDARWIN=1 -L/Developer/SDKs/ 
MacOSX10.4u.sdk/usr/lib -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include  
-arch ppc -arch i386 -I/usr/include/libxml2 -I/usr/include/openssl - MM 
$dir/*.c | sed s:^[^ ^#]:$dir/:; done  .depend



And this is for the error:

gcc -D_REENTRANT=1 -I. -Igw  -DDARWIN=1 -L/Developer/SDKs/ 
MacOSX10.4u.sdk/usr/lib -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include  
-arch ppc -arch i386 -I/usr/include/libxml2 -I/usr/include/openssl  - o 
wmlscript/wmlsc wmlscript/wmlsc.o libgw.a libwmlscript.a libwap.a  
libgwlib.a -lssl -lresolv -lm  -lpthread -liconv -L/usr/lib -lxml2 - lz 
-lpthread -liconv -lm -L/usr/lib -lcrypto -lssl


ok, so where do that '-arch ppc -arch i386' cflags come from?

@Aarno: I don't see any impact from yout patch to this flag things?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-12 Thread Stipe Tolj

Guillaume Cottenceau wrote:


The Kannel group has been very reluctant in half-fixing this
problem over the past 4 years (look at the large number of
submitted patches that were refused). I'd find surprising that
the policy would change now :)

I'm very much in favor of a complete/full solution.


same with me... The problem is that it's not trivial.

And by having a generic discussion about it *NOW*, will have us on the way in 
solving it.


Ok, can you express an architecture concept on how MSISDN scheme policy should 
be handled?


Stipe


---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] DLR with field_dst not supported in Mysql/Pgsql

2006-01-12 Thread Stipe Tolj

Olivier Dormond wrote:


If that's the main problem, I think it simply needs to be addressed.


yep.


Falling back the global unified_prefix in case no one is defined for
the smsc is conceptually fine for me. The only problem I see as stated
in my previous mail (Message-ID: [EMAIL PROTECTED]) is that
accessing the global unified_prefix needs some instrumentation because
it's presently not accessible from the code in gw/smsc/*.c

The simplest instrumentation might be to add a field for the global
unified_prefix in the SMSCConn struct. Can we agree on such a scenario ?


the same unified-prefix value in hundrets of SMSCConns?
Hmmm... not the way I'd would go for.

We need more brain on this...

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: dlr_mysql_add and internal charset

2006-01-12 Thread Stipe Tolj

Peter Christensen wrote:


The operator which require this behavior is Cellebrum, if I remember 
correct, but NowSMS expect this behavior by default (but users can 
disable it). What it does is really transmitting the text in raw binary 
form when UDH is present.


Consider the UDH

06 00 03 56 02 02 (UDHL=6, last part of a concatenated SMS with ref. 0x56)

and message body:

Test msg (54 65 73 74 20 6D 73 67)

In binary form, split into septets, the body will look like:

06 00 0C 30 25 40 00 (this is the UDH) 54 65 73 74 20 6D 73 67

If we pack this into octets, we get:

06 00 03 56 02 02 A8 E5 39 1D D4 9E 9F 01

which will then be transmitted to the operator. The operator is now 
forced to guess the actual length in septets based on the length in 
octets, and in this particular example, the operator will assume 9 
septets instead of the correct 8 (14*8/7 = 16 - 7 (udh) = 9).


The mobile will decode the message as:

Test msg@ 54 65 73 74 20 6D 73 67 00)

So to avoid this (unless actually intentional), the message is padded 
with a space in case the total length of UDH + binary encoded message is 
unfortunate. So the patch would transmit


06 00 03 56 02 02 A8 E5 39 1D D4 9E 9F 61

which is decoded into

Test msg  (54 65 73 74 20 6D 73 67 20)

I very much hope that gateways of this sort is very rare, but I posted 
the patch anyway. My vote for CVS commit is very much -1 (even though 
the feature is selectable through configuration)


Hmmm, I'm +0 (due to the fact it is selectable and there is no default behaviour 
change).


@Alex, Aarno??? Anyone else please... Opinions? Votes?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [Kannel-Devel] Re: dlr_mysql_add and internal charset

2006-01-12 Thread Stipe Tolj

Peter Beckman wrote:


On Tue, 10 Jan 2006, Peter Christensen wrote:


kannel.mblox.errors.diff:
* Added recognition of all mBlox SMPP errors



 It was my understanding that we weren't going to add any
 aggregator-specific code to kannel?  I had done some exploratory work to
 figure out how we could add optional parameters to the config file to
 accept and handle them, but never finished.

  * Add support for ALL SMPPv5 error codes, including mBlox specific 
codes. (That is, recognize them and translate to human readable text)



 While I think this is valuable to mBlox customers, I don't think it
 applies to the kannel world as a whole, and should be left out of the
 code.

 I do think, however, that there should be a place to upload aggregator
 specific patches on kannel.org.


Ok, I do agree here too.

It's a clean policy to have a clean standard distro and several patches 
that add aggregator features.


But problems arrise from this: If it is part of Kannel, people will require us 
(the group, the mailing list) to support it... hense we'd need Mantis entries 
for those to keep bug tracking, etc. etc. etc.


So we obviously have the same effect as if we had it in the distro.

So it should be a sort of contrib place, where we define clearly, you can have 
it, use it, but don't blame us for it.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [Kannel-Devel] Re: dlr_mysql_add and internal charset

2006-01-12 Thread Stipe Tolj

Arne K. Haaje wrote:

Nothing outside standard protocol behaviour should be in Kannel, but 
maybe something like contrib/patches could be used for stuff like 
aggregators extensions?


yep...

An idea that runs through my head since some time... we could evolve 
www.kannel.org more into a Kannel-Forge (using gforge)?


This would benefit that users may spin-off their own aggregator extension 
project without the need of the core developers interacting and taking care of it.


Would be also a market-place for Kannel add-on modules, ie. J2ME docking 
facilities to bearerbox using Kannel's internal smsbox protocol, etc.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-12 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:


Stipe,

They are in the specific configuration for *apple-darwin* in  
configure.in, I think the purpose of those flags is that if configure  
finds the SDK to build Universal Binaries (PPC and i386) it will use  
it, but this flags has a conflict with -MM option (since it can only  be 
used with one architecture).


gcc: -E, -S, -save-temps and -M options are not allowed with  multiple 
-arch flags


ok, yep... I see now.

I have the same on Darwin Kernel Version 8.3.0.

Ok, so Andreas (afink) added this feature in:

http://www.kannel.org/cgi-bin/viewcvs.cgi/gateway/configure.in.diff?r1=1.153r2=1.154

;)

Why should be try to build universal (multi-arch) binaries here?
Nice to have, but nothing really required here, since we build obviously for the 
desired architecture at runtime.


Stipe
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-12 Thread Stipe Tolj

Aarno Syvänen wrote:


Hi List,

Current configure does *not* work with Mac at all. So i use following  
instead:


Index: configure.in
===
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.155
diff -r1.155 configure.in
157,158d156
 AC_CHECK_LIB(c_r, pthread_exit, [LIBS=$LIBS -lc_r;  pthread=yes])
 AC_CHECK_LIB(kse, pthread_exit, [LIBS=$LIBS -lkse;  pthread=yes])
203a202,203
  AC_SEARCH_LIBS([pthread_exit], [c_r], [pthread=yes])
  AC_SEARCH_LIBS([pthread_exit], [kse], [pthread=yes])
214c214,229
 AC_CHECK_HEADERS(sys/socket.h sys/sockio.h net/if.h netinet/in.h)
---
  AC_CHECK_HEADERS([sys/socket.h])
  AC_CHECK_HEADERS([net/if.h], [], [],
   [#include stdio.h
#if STDC_HEADERS
# include stdlib.h
# include stddef.h
#else
# if HAVE_STDLIB_H
#  include stdlib.h
# endif
#endif
#if HAVE_SYS_SOCKET_H
# include sys/socket.h
#endif
])
  AC_CHECK_HEADERS(sys/sockio.h netinet/in.h)

Does anybody object me committing this change. It is, does break some  
other os.


Hi Aarno,

now I commited a revert from Andreas changes regarding the usage of the SDK 
location rather then /usr based libs and includes for darwin.


Why are these changes from your side required?
I don't see the connection point to the multiple -arch flags thing Cesar 
reported.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-12 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:

Agree, I think it should detect the architecture and build for that  
architecture, we could have separates binaries packages for PowerPC  and 
Intel for distribution. It would be convenient, for example por  
DarwinPorts or Fink to have just one Universal package that you can  
download and run on both platforms, but if the conflicts with -M flag  
can't be solved I don't see the problem of having 2 packages. Don't  
know how the rest of the open source available for the Mac is going  to 
handle this thing Universal.


yep, I reverted the section, see ChangeLog:

2006-01-13  Stipe Tolj  stolj at kannel.org
  * configure[.in]: reverting changes from Andreas in rev 1.154 for setting
both (i386 and ppc) architecture flags for darwin (MacOS X). This causes
errors with -MM cfalgs and we should build for the architecture we run.
Thanks to Cesar Gutierrez Corea [EMAIL PROTECTED] for his reporting
and Aarno for investigating this issue further on.
[Msg-Id: [EMAIL PROTECTED]]

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-13 Thread Stipe Tolj

Aarno Syvänen wrote:

It is obvious, that you cannot have -MM flags with dual architecture,  
because dependencies are different with
different archs. But is this flag necessary at all ? I can definitely  
compile for ppc and i386, I just ignore warnings.


hmm, I never figleted arround the pre-compiler options (-MM).

I know, the same here, compiles and builds for both... But the bunch of warnings 
is definetly annoying.


Personally I'm more for reducing warning etc. stuff. If users definetly want to 
build for both archs the universal binarie, I'm fine with that.


My intention was at first to scope out things that seem to be wrong.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: configuring for Mac

2006-01-13 Thread Stipe Tolj

Aarno Syvänen wrote:

When I started to to fix double arch, i tried to configure cvs. Got  
lots of these:


checking pthread.h usability... no
checking pthread.h presence... yes
configure: WARNING: pthread.h: present but cannot be compiled
configure: WARNING: pthread.h: check for missing prerequisite  headers?
configure: WARNING: pthread.h: see the Autoconf documentation
configure: WARNING: pthread.h: section Present But Cannot Be  
Compiled

configure: WARNING: pthread.h: proceeding with the preprocessor's result
configure: WARNING: pthread.h: in the future, the compiler will take  
precedence

configure: WARNING: ## -- ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING: ## -- ##
checking for pthread.h... yes

This happens with about every system file. In tests, includes do not  
work properly.

Change I posted does fix this.


Hmm, ok, this is for re-creating configure itself via autocnf. I have the same 
here if I use autoconf-2.58 instead of -2.13.


Can't we resolve this with more sophisticated m4 macros?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: gcc -MM

2006-01-13 Thread Stipe Tolj

Andreas Fink wrote:

Aarno was reporting that there is another issue with MacOS X and the - 
MM flag.
Note that -MM is not a flag to be used on MacOS X because of its Dual  
Architecture compilation.

-MM does precompile the headers so you dont have to do it every time.
However when you compile in one go for i386 and ppc, then you get two  
different precompiled header files but only one output one.


The use of --disable-dependency-tracking disables this automatically.
So for MacOS X with dual architecture supported compiler, this should  
automatically be enabled.


which implies now the following change?

Do we really want to have a build for both archs?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: gcc -MM

2006-01-13 Thread Stipe Tolj

Aarno Syvänen wrote:

Yes, I think building for dual architecture would be useful, because  
mac sites would probably have some
time old ppc macs and new intel macs. But I think this would be a  
configuration option.


ok, so we come to the conclusion that we should build on the native arch we are 
configuring on, *AND* as an addition the user may switch on the dual arch binary 
build if required.


Which means we need a patch for configure.in to set this option?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: SQLBox Project

2006-01-13 Thread Stipe Tolj

Cesar Gutierrez Corea wrote:

What is the roadmap for the SQLBox project, is it going to be  included 
in the Kannel main distribution or will it be available as a  patch/plugin?


it is available...

Rene is the maintainer of the module and it's an own CVS module:

  http://www.kannel.org/cgi-bin/viewcvs.cgi/sqlbox/

Stipe

What we still need is a clean way in having an API to include and build it 
as plugin.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: submit_sm failed

2006-01-15 Thread Stipe Tolj

Mario Noboa wrote:

Hi list,

 


I’m connecting with a smsc some months ago. A few times I received this
message, 

 


2006-01-14 16:12:31 [20418] [7] WARNING: SMPP: PDU NULL terminated string
has no NULL.

2006-01-14 16:12:31 [20418] [7] ERROR: SMPP[CELUCOL]: SMSC returned error
code 0x0045 (Unknown/Reserved) in response to submit_sm.

 


But now this appears a lot of times in a day. I know this error means
“submit_sm or submit_multi failed”.  

 


My question…. Do Kannel resend the message when this occurred?


No, AFAIR this is considered as fatal error by the SMSC and the message is 
dropped. Kannel does try to resend the message _only_ for throttling errors.


Can you please send us more from this suspicious SMPP SMSC as debug log level in 
attachement for review.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: How to configure sms push!

2006-01-20 Thread Stipe Tolj

Anthony Arriola wrote:


Hi to all,

I'm new wtih kannel and I can't get any message to my mobile using the 
sendsms/sms push thru HTTP request.
I'm trying to send a sample message to my mobile using sendsms/sms push 
and my mobile hasn't receive any messages using a

GSM MODEM.


please do _NOT_ cross-post to various lists. We consider this annoying.

Your topic is generally for the users@ list, but if there is no resonance in a 
particular time, you're free to re-post to [EMAIL PROTECTED] But it's definetly 
_OUT_OF_SCOPE_ for [EMAIL PROTECTED]


Please _attach_ the barerbox.log and post to devel@ if the bearerbox.log 
contains and ERROR or PANIC messages while trying to push out the PDU via the modem.


Stipe


--
Für weitere Fragen stehe ich Ihnen gerne telefonisch
oder via E-Mail zur Verfügung.

Mit freundlichen Grüßen


Stipe Tolj
OSS System Architect

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Memory leak in smsbox

2006-01-21 Thread Stipe Tolj

Alejandro Guerrieri wrote:

Peter,

I'll definitely try it. I've been struggling to find the cause of a
misterious memory-eating smsbox for weeks.

Since I don't master the debugging skills I've ended up using
tcptools (the supervise program from DJB) and softlimit to deny the
smsbox more memory, so the offending process get killed and restarted,
but I know it's a temporary solution. I think your patch may come in
handy :)


yep, agree'ing... BTW, debugging memory leaks may be done with valgrind. Which 
is our favorite approach to identify these kind of issues.



I'll try your patch and let you know if the problem is fixed on my setup.


good, we approtiate any support in reviewing patchsets by users. Please do so 
and drop a vote on the list.


I'll do the same.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Memory leak in smsbox

2006-01-21 Thread Stipe Tolj

Peter Christensen wrote:

Another unrelated thing... I've been bombing the mailing list with 
patches and stuff the last few weeks, but what exactly is the preferred 
way of getting patches? In the mailing list, or by creating a bug report 
with an attached patch?


prefered way is the mailing list, IMO. Where you prefix the subject with 
[PATCH] foobar patch, so we have a fast indication scanning the topics and 
attaching the patch in unified diff format as you did for this.


This is mostly for new features, or behaviour changes.

If you patch _DOES_ fix an obvious bug, I'd suggest to go with the bug tracking 
way, so we keep track of the things that have been fixed. Hence fill in a bug 
report and provide the patch as attachement there.


Developers who wish to follow the development stream will hence be subscribed to 
devel@ for general purposes and discussion _AND_ have a mantis account receiving 
and new issues from there.


This would be my suggested approach... others?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Memory leak in smsbox

2006-01-22 Thread Stipe Tolj

Peter Christensen wrote:


diff -Nru gateway/gw/smsbox.c gateway.leak/gw/smsbox.c
--- gateway/gw/smsbox.c 2005-12-09 03:14:31.0 +0100
+++ gateway.leak/gw/smsbox.c2006-01-20 21:30:57.0 +0100
@@ -2119,7 +2119,7 @@
newfrom = octstr_duplicate(global_sender);
 } else {
returnerror = octstr_create(Sender missing and no global set, 
rejected);
-   goto fielderror2;
+   goto fielderror3;
 }


can we revise this to keep the present goto labels instead of introducing new 
ones? The flow-control-logic in that function get's too complicated.



 info(0, sendsms sender:%s:%s (%s) to:%s msg:%s,
@@ -2365,6 +2365,11 @@
 octstr_destroy(newfrom);
 msg_destroy(msg);
 
+fielderror3:

+gwlist_destroy(allowed, NULL);
+gwlist_destroy(denied, NULL);
+gwlist_destroy(receiver, octstr_destroy_item);
+


why don't we gwlist_destroy([allowed|denied], octstr_destroy_item) too?



 fielderror2:
 alog(send-SMS request failed - %s,
  octstr_get_cstr(returnerror));



Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: ota_compiler

2006-02-03 Thread Stipe Tolj

Hi Tomas,

Tomas Varaneckas wrote:


Hi,

There is obviously something fishy about ota_compiler OMA settings 
support. Lines from

http://www.mbuni.org/downloads/1.0.0/mbuni-kannel-patch-full:

+static ota_3table_t oma_ota_attributes[] = {
+ {version, 1.0, 0x46},
+ {version, INLINE, 0x45},
+ {type, PXLOGICAL, 0x51},


lines in ota_compiler.c:

static ota_3table_t oma_ota_attributes[] = {
   { VERSION, INLINE, 0x45 },
   { VERSION, 1.0, 0x46 },


differs, eh? that means patch was modified before putting it into CVS. 
was it tested afterwards?


now, I have commited Paul's patch with slight changes. Ie. the ordering of the 
attributes inside the array. But this has no effect, since the accessing 
routines do anyway a linear scan in searching on the values.


the fact is that when i try to send oma settings xml via kannel and then 
check the debug dump, i can see that no attributes are used, wbxml is 
made with help of inline strings.


Original XML document: (official nokia example)

?xml version=1.0?
!DOCTYPE wap-provisioningdoc PUBLIC -//WAPFORUM//DTD PROV 1.0//EN 
“http://www.wapforum.org/DTD/prov.dtd;

wap-provisioningdoc version=1.0
characteristic type=NAPDEF
parm name=NAPID value=inet/
parm name=NAME value=InternetNAPDEF/
parm name=BEARER value=GSM-GPRS/
parm name=NAP-ADDRESS value=internet/
parm name=NAP-ADDRTYPE value=APN/
parm name=INTERNET/
/characteristic
characteristic type=APPLICATION
parm name=APPID value=w2/
parm name=TO-NAPID value=inet/
characteristic type=RESOURCE
parm name=URI value=http://wap.krak.dk/
parm name=STARTPAGE/
/characteristic
/characteristic
characteristic type=BOOTSTRAP
parm name=NAME value=Sonofon Browser/
/characteristic
/wap-provisioningdoc
The XML document above converted to binary

Nokia given dump without wsp headers (works when sent by hand, not 
through kannel's sendota):


030B6A05 696E6574 00C54601 C6550187 ..j. inet ..F. .U..
11068300 01870706 03496E74 65726E65   .Int erne
744E4150 44454600 01871006 AB018708 tNAP DEF.  
0603696E 7465726E 65740001 87090689 ..in tern et.. 
01871401 01C60001 55018736 0603   U..6 
77320001 87220683 0001C600 01590187 w2.. ...  .Y..
3A06 03687474 703A2F2F 7761702E :... .htt p:// wap.
6B72616B 2E646B00 01871C01 0101C656 krak .dk.  ...V
01870706 03536F6E 6F666F6E 2042726F  .Son ofon Bro
77736572 00010101

Kannel dump (bleeding edge CVS version):

2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 01 06 2f 1f 2d b6 91 81 92 
43 37 43 34 42 36 44   ../.-C7C4B6D
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 44 31 31 34 30 33 30 30 39 
44 35 38 45 38 46 33   D11403009D58E8F3
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 44 38 32 33 42 30 30 35 33 
36 46 45 32 36 35 39   D823B00536FE2659
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 45 00 03 0b 6a 00 c5 45 03 
31 2e 30 00 01 c6 50   E...j..E.1.0...P
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 03 4e 41 50 44 45 46 00 01 
87 05 03 4e 41 50 49   .NAPDEF.NAPI
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 44 00 06 03 69 6e 65 74 00 
01 87 05 03 4e 41 4d   D...inet.NAM
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 45 00 06 03 49 6e 74 65 72 
6e 65 74 4e 41 50 44   E...InternetNAPD
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 45 46 00 01 87 05 03 42 45 
41 52 45 52 00 06 03   EF.BEARER...
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 47 53 4d 2d 47 50 52 53 00 
01 87 05 03 4e 41 50   GSM-GPRS.NAP
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 2d 41 44 44 52 45 53 53 00 
06 03 69 6e 74 65 72   -ADDRESS...inter
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 6e 65 74 00 01 87 05 03 4e 
41 50 2d 41 44 44 52   net.NAP-ADDR
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 54 59 50 45 00 06 03 41 50 
4e 00 01 87 05 03 49   TYPE...APN.I
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 4e 54 45 52 4e 45 54 00 01 
01 c6 50 03 41 50 50   NTERNETP.APP
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 4c 49 43 41 54 49 4f 4e 00 
01 87 05 03 41 50 50   LICATION.APP
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 49 44 00 06 03 77 32 00 01 
87 05 03 54 4f 2d 4e   ID...w2.TO-N
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 41 50 49 44 00 06 03 69 6e 
65 74 00 01 c6 50 03   APID...inet...P.
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 52 45 53 4f 55 52 43 45 00 
01 87 05 03 55 52 49   RESOURCE.URI
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 00 06 03 68 74 74 70 3a 2f 
2f 77 61 70 2e 6b 72   ...http://wap.kr
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 61 6b 2e 64 6b 00 01 87 05 
03 53 54 41 52 54 50   ak.dk.STARTP
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 41 47 45 00 01 01 01 c6 50 
03 42 4f 4f 54 53 54   AGE.P.BOOTST
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 52 41 50 00 01 87 05 03 4e 
41 4d 45 00 06 03 53   RAP.NAME...S
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 6f 6e 6f 66 6f 6e 20 42 72 
6f 77 73 65 72 00 01   onofon Browser..
2006-01-31 10:16:09 [8917] [3] DEBUG:   data: 01 
01   

Re: ota_compiler

2006-02-04 Thread Stipe Tolj

Tomas Varaneckas wrote:

I'm new to kannel's architecture, so it's hard for me to see if 
something is actually wrong with the code.. However, I've set up kannel 
1.4.0, applied

the mbuni patch and got a different dump:

2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 01 06 2f 1f 2d b6 91 80 92 
34 42 33 43 31 31 31   ../.-4B3C111
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 42 33 39 44 45 35 39 38 30 
33 37 32 30 44 33 44   B39DE59803720D3D
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 44 37 30 37 45 30 38 30 33 
36 34 41 36 34 31 46   D707E080364A641F
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 32 00 03 0b 6a 00 c5 46 01 
c6 55 01 87 11 06 03   2...j..F..U.
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 69 6e 65 74 00 01 87 07 06 
03 49 6e 74 65 72 6e   inet..Intern
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 65 74 4e 41 50 44 45 46 00 
01 87 10 06 ab 01 87   etNAPDEF
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 08 06 03 69 6e 74 65 72 6e 
65 74 00 01 87 09 06   ...internet.
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 89 01 87 14 01 01 c6 00 01 
55 01 87 36 06 03 77   .U..6..w
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 32 00 01 87 00 00 22 06 03 
69 6e 65 74 00 01 c6   2...inet...
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 00 01 59 01 87 3a 06 03 68 
74 74 70 3a 2f 2f 77   ..Y..:..http://w
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 61 70 2e 6b 72 61 6b 2e 64 
6b 00 01 87 00 00 1c   ap.krak.dk..
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 01 01 01 c6 56 01 87 07 06 
03 53 6f 6e 6f 66 6f   V.Sonofo
2006-02-04 01:54:56 [4077] [3] DEBUG:   data: 6e 20 42 72 6f 77 73 65 72 
00 01 01 01n Browser


This is closer to Nokia version, attributes are used, no string table 
generation though.. However, this worked and device got the settings 
correctly. And the request did not freeze
without response, as it does with latest CVS kannel... I would gladly 
help fixing it, but
I'm new to kannel's architecture and not too comfortable with C. Yet, 
for now I solved my problems by making a tool which converts XML file to 
wbxml via libwbxml2 (which does the conversion well), then cut it to 
pieces and sending manually message by message (auto concatenation did 
not work well, for some reason). Well, this sure is an ugly solution

and I'd be glad to see kannel fixed instead..


yep, confirmed this for kannel-1.4.0+mbuni-patch.

Now, the only thing I changed for the patch is the order of the attributes in 
the array and the case-sensitivety. But obviously this causes to break.


I'm investigating...

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: ota_compiler

2006-02-04 Thread Stipe Tolj

fixed in cvs, see ChangeLog:

2006-02-04  Stipe Tolj  stolj at kannel.org
  * gw/ota_compiler.c: fixed OMA compilation, due to mis-ordered array of
parameter attributes which caused all attributes to be inlined.
Thanks to Tomas Varaneckas [EMAIL PROTECTED] for report.
[Msg-Id: [EMAIL PROTECTED]]

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Malformed addr for Incoming short code

2006-02-05 Thread Stipe Tolj

Amol Patwardhan wrote:


Hi,

I am using Kannel bearer box II version cvs-20060110 on Red Hat.

I’ve configured the kannel for the short code ‘4900’. The outgoing messages
are going fine. However,
The incoming message fails to reach the post-url and kannel.log is showing
the following log

Mallformed addr ‘4900', expected at least 7 digits.  !!


as Alex suggests, we'd need a debug log-level from bearerbox dump to see the 
details of the deliver_sm PDU.


It seems that your SMSC provider sends a ton=1 but the shortcode is obviously 
only 4 digit long. So interpreting the protocol stricly the SMSC would have to 
define an appropriate ton instead.


BTW, please do _NOT_ cross-post to both mailing lists.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Some suggested changes to gwlib MIME module

2006-02-05 Thread Stipe Tolj

Paul Bagyenda wrote:


Hi,

Mbuni MMSC/MMS VAS Gateway makes heavy use of Kannel's GWLIB, which has 
resulted partly in some patches to Kannel from our side, to take care of missing 
stuff (or stuff we thought looked faulty). Many of these are now merged into CVS.
  
 One area we've been talking about for a while now is the Kannel MIME module. 
With Stipe's help we've managed to narrow down our issues to one problem: The 
fact that the layout of the MIMEEntity structure is exposed in the header file. 
 The potential problems are subtle. In our case we tripped on the following 
problem: If you have a multi-part MIME object that you have constructed manually 
(as is done for instance in the Mbuni code that converts an MMS into an MM7/SOAP 
message), and you want to extract its header (mime_entity_headers()) and then 
its body (mime_entity_body()), you end up with a wrong or missing boundary 
element for the content type in the header. The result is that header/body can 
no longer be combined and parsed! 
 
  In discussions with Stipe, it looks like whichever way you cut it, this kind 
of problem would arise, as long as users can muck around with the internal 
structure of a MIMEEntity. 
 Solution: Hide it and add additional helper functions for manipulating the 
structure. Suggested solution attached as a patch against CVS.


Thanks a lot Paul,

This looks good. I have revised the patch (attached) in terms of CodingStyle and 
some slight logic change.


Can you please review and comment if this is still what we want?

Comments from others please... I'm +1 on commiting the suggersted solution to 
cvs in order to solve the direct access problematic of the MIMEEntity object.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---
### Eclipse Workspace Patch 1.0
#P gateway-cvs
Index: gwlib/mime.c
===
RCS file: /home/cvs/gateway/gwlib/mime.c,v
retrieving revision 1.12
diff -u -r1.12 mime.c
--- gwlib/mime.c9 Dec 2005 02:41:14 -   1.12
+++ gwlib/mime.c6 Feb 2006 01:15:35 -
@@ -75,6 +75,18 @@
 
 
 /
+ * Internal data structure types
+ */
+ 
+struct MIMEEntity {
+List *headers;
+List *multiparts;
+Octstr *body;
+struct MIMEEntity *start;   /* in case multipart/related */
+};
+
+
+/
  * Creation and destruction routines.
  */
 
@@ -150,20 +162,61 @@
 }
 
 
+/* 
+ * This function checks that there is a boundary parameter in the headers
+ * for a multipart MIME object. If not, it is inserted and passed back to 
caller
+ * in the variable boundary_elem.
+ */
+static void fix_boundary_element(List *headers, Octstr **boundary_elem)
+{
+Octstr *value, *boundary;
+
+if (headers == NULL)
+return;
+
+/* 
+ * Check if we have an boundary parameter already in the 
+ * Content-Type header. If no, add one, otherwise parse which one 
+ * we should use.
+ * XXX this can be abstracted as function in gwlib/http.[ch].
+ */
+value = http_header_value(headers, octstr_imm(Content-Type));
+boundary = http_get_header_parameter(value, octstr_imm(boundary));
+if (boundary == NULL) {
+boundary = octstr_format(_boundary_%d_%ld_%c_%c_bd%d, 
+random(), (long)time(NULL), 'A' + (random()%26), 
+'a'+(random() % 26), random());
+octstr_format_append(value, ; boundary=%S, boundary);
+ 
+http_header_remove_all(headers, Content-Type);
+http_header_add(headers, Content-Type, octstr_get_cstr(value));
+http_header_add(headers, MIME-Version, 1.0);
+}
+octstr_destroy(value);
+
+/* if we got a NULL'ed value, throw away, otherwise return */
+if (boundary_elem)
+*boundary_elem = boundary;
+else 
+octstr_destroy(boundary);
+}
+
+
 /
  * Mapping function from other data types, mainly Octstr and HTTP.
  */
 
 static Octstr *mime_entity_to_octstr_real(MIMEEntity *m, unsigned int level)
 {
-Octstr *mime, *value, *boundary;
+Octstr *mime, *boundary;
 List *headers;
 long i;
 
 gw_assert(m != NULL  m-headers != NULL);
 
+boundary = NULL;
 mime = octstr_create();
-
+
 /* 
  * First of all check if we have further MIME entity dependencies,
  * which means we have further MIMEEntities in our m-multiparts
@@ -181,26 +234,9 @@
 goto finished;
 }
 
-/* 
- * Check if we have an boundary parameter already 

Re: Some suggested changes to gwlib MIME module

2006-02-05 Thread Stipe Tolj

BTW, does this still keep test/test_mime_multipart.c functioning?

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Malformed addr for Incoming short code

2006-02-06 Thread Stipe Tolj

Amol Patwardhan wrote:


Hi Stipe/Alex,

Please take a look at the SMPP PDU dump: Kannel bearerbox II version 
cvs-20060110

2006-01-29 15:51:41 [12663] [6] DEBUG: SMPP[XXX]: Got PDU:
2006-01-29 15:51:41 [12663] [6] DEBUG: SMPP PDU 0x8a0c5e8 dump:
2006-01-29 15:51:41 [12663] [6] DEBUG:   type_name: deliver_sm
2006-01-29 15:51:41 [12663] [6] DEBUG:   command_id: 5 = 0x0005
2006-01-29 15:51:41 [12663] [6] DEBUG:   command_status: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   sequence_number: 2 = 0x0002
2006-01-29 15:51:41 [12663] [6] DEBUG:   service_type: NULL
2006-01-29 15:51:41 [12663] [6] DEBUG:   source_addr_ton: 1 = 0x0001
2006-01-29 15:51:41 [12663] [6] DEBUG:   source_addr_npi: 1 = 0x0001
2006-01-29 15:51:41 [12663] [6] DEBUG:   source_addr: 97339405477
2006-01-29 15:51:41 [12663] [6] DEBUG:   dest_addr_ton: 1 = 0x0001
2006-01-29 15:51:41 [12663] [6] DEBUG:   dest_addr_npi: 1 = 0x0001
2006-01-29 15:51:41 [12663] [6] DEBUG:   destination_addr: 4900
2006-01-29 15:51:41 [12663] [6] DEBUG:   esm_class: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   protocol_id: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   priority_flag: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   schedule_delivery_time: NULL
2006-01-29 15:51:41 [12663] [6] DEBUG:   validity_period: NULL
2006-01-29 15:51:41 [12663] [6] DEBUG:   registered_delivery: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   replace_if_present_flag: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   data_coding: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   sm_default_msg_id: 0 = 0x
2006-01-29 15:51:41 [12663] [6] DEBUG:   sm_length: 23 = 0x0017
2006-01-29 15:51:41 [12663] [6] DEBUG:   short_message:
2006-01-29 15:51:41 [12663] [6] DEBUG:Octet string at 0x8a0ca50:
2006-01-29 15:51:41 [12663] [6] DEBUG:  len:  23
2006-01-29 15:51:41 [12663] [6] DEBUG:  size: 24
2006-01-29 15:51:41 [12663] [6] DEBUG:  immutable: 0
2006-01-29 15:51:41 [12663] [6] DEBUG:  data: 0F 0F 0F 0F 0F 0F 0F 02 05 00 
02 02 0b 01 0c 0a   XXXBE XX
2006-01-29 15:51:41 [12663] [6] DEBUG:  data: 0c 02 02 0b 09 30 03  
,XX
2006-01-29 15:51:41 [12663] [6] DEBUG:Octet string dump ends.
2006-01-29 15:51:41 [12663] [6] DEBUG: SMPP PDU dump ends.
2006-01-29 15:51:41 [12663] [6] ERROR: SMPP[MAR]: Mallformed addr `4900', 
expected at least 7 digits.

***

When I reverted the kannel version back to: Kannel bearerbox II version cvs-20050908 
After this it works fine i.e., the TON is accepted and not treated as 'Mallformed'. 


SMPP PDU for this version,
2006-02-05 10:01:50 [12740] [6] DEBUG: SMPP[MAR]: Got PDU:
2006-02-05 10:01:50 [12740] [6] DEBUG: SMPP PDU 0x927d140 dump:
2006-02-05 10:01:50 [12740] [6] DEBUG:   type_name: deliver_sm
2006-02-05 10:01:50 [12740] [6] DEBUG:   command_id: 5 = 0x0005
2006-02-05 10:01:50 [12740] [6] DEBUG:   command_status: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   sequence_number: 1 = 0x0001
2006-02-05 10:01:50 [12740] [6] DEBUG:   service_type: NULL
2006-02-05 10:01:50 [12740] [6] DEBUG:   source_addr_ton: 1 = 0x0001
2006-02-05 10:01:50 [12740] [6] DEBUG:   source_addr_npi: 1 = 0x0001
2006-02-05 10:01:50 [12740] [6] DEBUG:   source_addr: 97339405477
2006-02-05 10:01:50 [12740] [6] DEBUG:   dest_addr_ton: 1 = 0x0001
2006-02-05 10:01:50 [12740] [6] DEBUG:   dest_addr_npi: 1 = 0x0001
2006-02-05 10:01:50 [12740] [6] DEBUG:   destination_addr: 4900
2006-02-05 10:01:50 [12740] [6] DEBUG:   esm_class: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   protocol_id: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   priority_flag: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   schedule_delivery_time: NULL
2006-02-05 10:01:50 [12740] [6] DEBUG:   validity_period: NULL
2006-02-05 10:01:50 [12740] [6] DEBUG:   registered_delivery: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   replace_if_present_flag: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   data_coding: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   sm_default_msg_id: 0 = 0x
2006-02-05 10:01:50 [12740] [6] DEBUG:   sm_length: 4 = 0x0004
2006-02-05 10:01:50 [12740] [6] DEBUG:   short_message: Test
2006-02-05 10:01:50 [12740] [6] DEBUG: SMPP PDU dump ends.
2006-02-05 10:01:50 [12740] [6] DEBUG: SMPP[MAR]: Sending PDU:
2006-02-05 10:01:50 [12740] [6] DEBUG: SMPP PDU 0x927d218 dump:
2006-02-05 10:01:50 [12740] [6] DEBUG:   type_name: deliver_sm_resp
2006-02-05 10:01:50 [12740] [9] DEBUG: send_msg: sending msg to boxc: XXX
2006-02-05 10:01:50 [12740] [6] DEBUG:   command_id: 2147483653 = 0x8005
2006-02-05 10:01:50 [12740] [6] DEBUG:   command_status: 0 = 0x
2006-02-05 10:01:50 [12740] [9] DEBUG: boxc_sender: sent message to 127.0.0.1
2006-02-05 10:01:50 [12740] [6] DEBUG:   sequence_number: 

Re: Malformed addr for Incoming short code

2006-02-06 Thread Stipe Tolj

Alexander Malysh wrote:


It's a bullshit what SMSC operator say. Ton=1/Npi=1 is international 
ISDN number planning. That mean that you should be able at least call 
this number from Landphone. Can you? I know the answer: no. Therefore 
is's a SMSC bug! SMSC should send with 0/0 (unknown/unknown) or at least 
1/2 (isdn/national)  or private/private.


yep, Alex is a bite hurish here... ;)

But he is right, when we come to hard facts. Actually the SMSC does not send the 
proper TON value here.


Now the issue is how do we handle this? I know that we as Kannel maintainer 
don't want to support buggy interpretations of SMPP, but if our users (Kannel 
users) don't have a chance to force the SMSC provider to correct things, they 
will have to patch on there own, and that's also an issue I'd like to avoid, 
mass individual patching. This brings us away from a generic development 
stream/branch.


I'll approach Conan from the SMPP forum to have a comment on this.

@all: Adding another config directive, ie. 'relaxed-ton-npi' that switches off 
the logical TON/NPI handling inside the SMPP module is not feasable? Default 
would be false, hence we do strict testing, but user's may decide to have a 
more relaxed version.


But this brings us up again to the point do we hence support protocol 
misbehaviours?. The answer SHOULD be no. But it's the same answer for the 
question should we allow to much individual patching and hence branch 
diversification.


Ideas, comments welcome.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [RFC] exponential back-off for #define SMPP_THROTTLING_SLEEP_TIME 15

2006-02-06 Thread Stipe Tolj
the subject was ment to by SMPP related, but of course this applies to SM/ASI 
too, but may not be of generic interest as SMPP ;)


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



[FYI] possible partial DNS outage for 'kannel.org' due to domain move

2006-02-08 Thread Stipe Tolj

Hello lists,

this morning the domain 'kannel.org' moved to an other DNS provider.

It may be possible that there are patial DNS ourtage problems in resolving the 
following hosts:


  www.kannel.org
  bugs.kannel.org
  cvs.kannel.org

Hopefully this will not be the case at everybody, but may be depending on the 
propagation time for DNS.


If problems keep remaining, pleas contact me.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---




Re: 1.4.1 release -- ETA?

2006-02-08 Thread Stipe Tolj

Loïc Minier wrote:


Hi,

 Is there an ETA for the 1.4.1 release?   Perhaps a list of bugs
 considered blocker of this release would help tracking progress?  (The
 current list of bugs with severity == blocker is obviously
 out-of-date.)


Hi Loic,

the only major blocker is the WTP-SAR bug, that is really crutial within WAP WTP 
stack. Carlos and I have a fixed version thou, even while it lacks an additional 
support for retries on networks that loos packets a lot.


Mindaugas has also posted some crashes in Mantis, that need a review.

Even while I was expecting to have 1.4.1 stable release before a week, I have to 
postpone as the situation looks like.


We're pretty close, but the last steps seem to take too long.

I'll review what Mindaugas has reported, and decide if I'll commit the existing 
WTP-SAR fix to CVS, tagging 1.4.1 stable and pushing the button.


Then we're going to have a 1.4.2 stable pretty close afterwards.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: 64bit Kannel

2006-02-13 Thread Stipe Tolj

Stuart wrote:


Hi,

I'm just new to Kannel and was wondering if anyone has had problems getting it 
to run on 64bit machines. I'm currently trying to get it to run on SuSe 9.6 and 
keep getting a 'Segmentation Fault'.


Hi Stuart,

you're using 1.4.0 stable, right? Please move to CVS head, it's a 1.4.1RC and 
supports 64bit.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: 64bit Kannel

2006-02-13 Thread Stipe Tolj

Vincent CHAVANIS wrote:


Stipe,

Are you sure of that ?

I've tried many times and get the same error from smsbox (lastest cvs-20060210)

2006-02-13 18:58:22 [13469] [0] PANIC: 
/usr/local/bin/smsbox-1.4.1(gw_panic+0x284) [0x442cb3]
2006-02-13 18:58:22 [13469] [0] PANIC: 
/usr/local/bin/smsbox-1.4.1(connect_to_bearerbox+0x50) [0x41d05e]
2006-02-13 18:58:22 [13469] [0] PANIC: /usr/local/bin/smsbox-1.4.1(main+0x2f7) 
[0x417c7f]
2006-02-13 18:58:22 [13469] [0] PANIC: /lib64/libc.so.6(__libc_start_main+0xef) 
[0x383fc1c3cf]
2006-02-13 18:58:22 [13469] [0] PANIC: /usr/local/bin/smsbox-1.4.1 [0x40c949]


we'd need more of the log _before_ the PANIC.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: 64bit Kannel

2006-02-13 Thread Stipe Tolj

Vincent CHAVANIS wrote:


Stipe, Alex,

Seems that bearebox segfault before smsbox attempt to connect

2006-02-13 18:58:22 [13469] [0] INFO: HTTP: Opening server at port 1.
2006-02-13 18:58:22 [13469] [0] INFO: Set up send sms service at port 1
2006-02-13 18:58:22 [13469] [0] ERROR: connect failed
2006-02-13 18:58:22 [13469] [0] ERROR: System error 111: Connection refused
2006-02-13 18:58:22 [13469] [0] ERROR: error connecting to server `127.0.0.1' 
at port `5000'
2006-02-13 18:58:22 [13469] [0] PANIC: Couldn't connect to the bearerbox.
2006-02-13 18:58:22 [13469] [0] PANIC: 
/usr/local/bin/smsbox-1.4.1(gw_panic+0x284) [0x442cb3]
2006-02-13 18:58:22 [13469] [0] PANIC: 
/usr/local/bin/smsbox-1.4.1(connect_to_bearerbox+0x50) [0x41d05e]
2006-02-13 18:58:22 [13469] [0] PANIC: /usr/local/bin/smsbox-1.4.1(main+0x2f7) 
[0x417c7f]
2006-02-13 18:58:22 [13469] [0] PANIC: /lib64/libc.so.6(__libc_start_main+0xef) 
[0x383fc1c3cf]
2006-02-13 18:58:22 [13469] [0] PANIC: /usr/local/bin/smsbox-1.4.1 [0x40c949]

here is the segfault

rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM], [], 8) = 0
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x40, -1, 
0) = 0x4c814000
mprotect(0x4c814000, 4096, PROT_NONE)   = 0
clone(child_stack=0x4d214270, 
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED,
 parent_tidptr=0x4d2149f0, tls=0x4d214960, child_tidptr=0x4d2149f0) = 13314
pipe([59, 60])  = 0
fcntl(59, F_GETFL)  = 0 (flags O_RDONLY)
fcntl(59, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(60, F_GETFL)  = 0x1 (flags O_WRONLY)
fcntl(60, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
futex(0x5d4e40, FUTEX_WAKE, 1)  = 1
write(2, 2006-02-14 02:18:38 [13293] [0] ..., 902006-02-14 02:18:38 [13293] 
[0] DEBUG: Started thread 21 (gw/smsc/smsc_emi.c:emi2_sender)
) = 90
futex(0x383fe32580, FUTEX_WAKE, 12006-02-14 02:18:38 [13293] [21] DEBUG: Thread 
21 (gw/smsc/smsc_emi.c:emi2_sender) maps to pid 13293.
)  = 1
2006-02-14 02:18:38 [13293] [21] INFO: EMI2[SMSC1]: connecting to Primary SMSC
write(7, 2006-02-14 02:18:38 [13293] [0] ..., 90) = 90
futex(0x74a160, FUTEX_WAKE, 1)  = 1
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
+++ killed by SIGSEGV +++


moreover a gdb backtrace of the core would be interesting...

As we see here your emi2 thread is starting and mutex things get involved.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: help whith kannel

2006-02-16 Thread Stipe Tolj

zied ben rejeb wrote:


hello everybody!
when trying to simulate kannel on a SMPP simulator
using the fake option, i couldn't see the sms though
it's written ;message sent.
see ya!


your request for help is a) not detailed enough and b) should go rather to 
users@ list instead of the devel@ list.


Please reformulate your issue and post to [EMAIL PROTECTED]

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



[FYI] fixed WTP bogus PDU handling bug and commited octstr_dump() enhancements

2006-02-22 Thread Stipe Tolj

Hi list,

two commits from my side for today:

2006-02-23  Stipe Tolj  stolj at kannel.org
  * wap/wtp.c: fixing bug #310, causing wapbox to panic while gwlist_append()
produces an assertion error if a malformed WTP datagram is tried to be
processes and we try to send an RcvError PDU deducing the TID value from
the WTP datagram, causing us to push the WAPEvent into a wrong list.

This was causing wapbox to panic on a high-loaded system. Now we're supposed to 
consider us immunic for bogus WTP data. We simply don't reply to the WTP initiator.


2006-02-23  Stipe Tolj  stolj at kannel.org
  * gwlib/octstr.[ch]: adding a more flexible octstr_dump() call via a variadic
macro call. Allowing a third argument specifying the log-level of the
Octstr dump. Ie. octstr_dump(ost, 0, GW_ERROR) will dump in ERROR log level.
The variadic macro will allow the current usage without a third parameter
and hence doesn't require mass patching of existing code. This more flexible
octstr_dump() is intended to be used for higher log level runs, where we
still want to dump particular data in case we run into warnings or errors.
Running in debug log level for real-life production systems in order to get
full data dumps is not suitable for a long period, so this allows a shorted
log level with reduced log sizes, but octstr_dumps where we need.

This is a feature improvement. Actually I always hated the idea to have debug 
log-level active in order to get flow-through data via ocstr_dump() calls.


On high-load systems your debug log-level will run you out of disk space very 
fast. So this is an approach to let developers log octstr data in a higher 
log-level.


This was applied for the above WTP layer fixing directly ;)

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---




Re: [PATCH] gethostbyname segfault

2006-02-23 Thread Stipe Tolj

Vincent CHAVANIS wrote:


This fixes the segfault i had,

when tried to connect bearbox on X86_64SMP and DNS SERVERS IPV6 compatible.
gethostbyname2() works like gethostbyname(), but permits to specify the address 
family (AF_INET) to which the address must belong.
Glibc2 also has reentrant versions gethostbyname_r() and gethostbyname2_r().


--- /cvs/gateway/gwlib/protected.c 2005-02-11 16:35:48.0 +0100
+++ /gateway/gwlib/protected.c 2006-02-23 14:00:23.0 +0100
@@ -193,7 +193,7 @@
 
 bufflen = 1024;

 *buff = (char*) gw_malloc(bufflen);
-while ((res=gethostbyname_r(name, hp,*buff, bufflen, tmphp, herr)) == 
ERANGE) {
+while ((res=gethostbyname2_r(name, AF_INET,hp,*buff, bufflen, tmphp, 
herr)) == ERANGE) {
 /* enlarge the buffer */
bufflen *= 2;
*buff = (char*) gw_realloc(*buff, bufflen);



Thanks for the patch Vincent.

Actually gethostbyname2() should be avoided IMO if no IPv6 build is done. So the 
question is, why does the response of the IPv6 eanbled DNS server break our 
regular IPv4 gethostbyname_r()?


AFAIS, the usage of gethostbyname2() is suggested to be avoided, since it's 
only a GNU extension, but no official API call.


Any comments from the others? I'm +-0 on commiting this, in terms of a clean 
resolving via autoconf detection macro and gw-config.h.in #define.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH][RFC] remove retry from http.c

2006-02-23 Thread Stipe Tolj

Alexander Malysh wrote:


Hi,

as no objections were here, commited to cvs.


any implications regarding user's doc? Is this actually a behaviour change I 
should mention in the NEWS file for 1.4.1?


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: CVS doesnt compile

2006-02-28 Thread Stipe Tolj

Rene Kluwen wrote:


You changed the function conn_write_data, removing the unsiged modifier from
the char *data parameter in gwlib/conn.c.
You need to update gwlib/conn.h accordingly; and commit to CVS.


yep, I fixed cvs, leaving the unsigned char as in previous revision. Thanks 
Rene.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: kannel installation problem

2006-03-01 Thread Stipe Tolj

rashmi s wrote:


I am trying to install kannel-1.4.0-3.1.fc2.fr.i386.rpm and the same devel.I 
have
  libxml2-2.5.4-1.i386.rpm and the devel rpm installed.when i gave the command rpm -q libxml2,I got 
  this version displayed.Now when I try to install Kannel,the following error is displayed,
  
libc.so.6(GLIBC_2.3.4) is 
needed by kannel-1.4.0-3.1.fc2.fr
   
   libsqlite.so.0 is needed by kannel-1.4.0-3.1.fc2.fr


obviously the person package'ing Kannel for FC2 compiled with SQLite support, 
you need the addequate sqlite rpm too.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH]: HTTP reply from sendota fixes (#1)

2006-03-24 Thread Stipe Tolj

Dziugas Baltrunas wrote:


Hi,

I kept this in mind, but I was trying to follow current indenting of
the relevant blocks which is already messed quite a lot, otherwise
patch would became irrelevant for the fix, but indents.

Anyway, fixed some of them.


+1 from me too, Alex pushed me for reviewing ;)

intending may be done always for any routine we touch, in order not to re-intend 
the whole file, but at least the routine where we patch.


Looks good to me, Alex states he will be commiting.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: WAP Concurrent Connections

2006-03-24 Thread Stipe Tolj

OLOTU Olayinka wrote:

Hello All;

i have a running Kannel 1.4.0 WAP Gateway running with one wapbox on an HP 
DL560 server
running Redhat AS 3.

I'd like to know how many concurrenct user connections that a wapbox can 
handle, and
the effect [if any] of using more than a single wapbox, i.e what scale of 
increase in
connection capacity would the addition of another wapbox bring?


Hello Bayo,

now, the load-capacity of Kannel acting as WAP GW can be as follows:

Linux 1x CPU Xeon 3.4G, 2GB RAM handles arround 200-250 req concurrent
Linux 8x CPU Xeon MP 2.7G, 4 GB RAM handles arround 750-800 req concurrent

now these are local benchmark testing.

When using in a real-work production environment you will have for the first 
example arround 180-200 concurrent connections handling.


Kannel is designed to spread the load across wapboxes, so each wapbox handles a 
queue of req. Using 2 wapbox means: un-blocking requests that fly throu the 
system and so on


Now using more and more wapboxes has a draw-back. At bearerbox we need to route 
the WDP datagrams to the corret wapbox.


Usually optimum is something between 2,3,4 wapboxes. Not more. I suggest trying 
2.

If you need further support, please let me know.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: download

2006-03-27 Thread Stipe Tolj

MOHAMMED SADIQ wrote:


I have been trying to download Alligate Server package SMS and WAP Gateway from 
diffrent site that present the link, but i alway get message such page could not be 
display does it mean the site does not exist again. where exactly can i get the download or 
the CD to buy?. i will appreciate usefull link i could use to get it.


Hi Mohammed,

The so called Alligata server was a Kannel commercial spin-off of the former 
3G Lab Ltd., which does not operate anymore in the field of Kannel support or 
offerings.


You can use the open source Kannel obviously from our site. If you need 
professional support for commercial production environment, there are several 
Kannel developers offering commercial support.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Aliases for sms-service is NOT working

2006-04-21 Thread Stipe Tolj

Marc Ricart wrote:


Hi ,

aliases on sms-services are not working on 1.4.0 and even in the kannel 
snapshot . I've tried aplying a patch found in the list ( Subject : Aliases for 
sms-service is working ) but it makes smsbox crash after a while . 


Some help would apreciated .

Thnx 


Regards

Marc

Here is the patch 


--- ../../../tom2/gateway/gw/urltrans.c Wed Mar  2 14:55:00 2005
+++ urltrans.c  Wed May 25 16:55:18 2005
@@ -1386,6 +1386,7 @@ static URLTranslation *find_translation(
 octstr_convert_range(keyword, 0, octstr_len(keyword), tolower);
 
 list = get_matching_translations(trans, keyword);

+if (gwlist_len(list)==0) list=dict_get(trans-dict,keyword);
 /*
   list now contains all translations where the keyword of the sms matches 
the

   pattern defined by the tranlsation's keyword



yep, confirming, this is known, see bug report #224 at

  http://bugs.kannel.org/view_bug_page.php?f_id=224

we need to resolve this for upcoming 1.4.1.

Marc, can you provide a patch to fix the problem? I'm a bit stressed in carring 
for all the issues. If you can post a patch I'll review, test and commit.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Kannel Installation Problem on Fedora 2

2006-05-08 Thread Stipe Tolj

Madan KN wrote:


Hi,

I have installed the kannel successfully using the following rpm for fedora
Core 2 

kannel-1.4.0-3.1.fc2.fr.i386.rpm 
kannel-devel-1.4.0-3.1.fc2.fr.i386.rpm 

But am not able to locate or start the kannel using. 
/etc/rc.d/init.d/kannel start 


Says No such file or Directory.


As far as I know the RPMs are not maintained, at least not for 1.4.0.

Please go ahead and pull a CVS head version from the CVS repository and compile. 
It's more reliable then 1.4.0 and is a release candicate for upcoming version.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] Revised smsbox leak/segfault patch

2006-05-08 Thread Stipe Tolj

Peter Christensen wrote:


Hi,

I know it is long ago, but back in the beginning of February, I posted a 
patch which resolved a number of memory leaks and potential segmentation 
faults in the smsbox_req_handle. The patch was not accepted, apparently 
primary due to a lot of ugly labels and stuff. So now, 3 months later, 
I've taken the time to do a prettier patch (hopefully).


To summarize:

* Relevant List and Octstr variables are initialized to NULL
* All field errors jump to field_error label
* Transmission failure jump to transmission_error label
* Regardless of the outcome, memory cleanup and function termination is 
the same piece of code (labeled cleanup)


Without this patch, newfrom, denied, allowed, receiver, and failed_id 
might not be freed, depending on the error condition. When I worked with 
the old patch, segmentation faults was also possible under the right 
circumstances, but apparently this is not the case anymore (or x86-64 
behave different than x86 - I've changed architecture since then)



I apologize for the long delay, but my mind have been elsewhere. And 
since my own installation of kannel is patched with my old patch, I 
haven't experienced leaks and segmentation faults since, and have thus 
not been reminded of the issue. (This is actually also the case with the 
MySQL escaping in dlr_mysql.c)


Hi Peter,

thanks a lot for the revised re-submission. I'll will have a review go this 
afternoon on this.


(Which does not mean that other should not ;)... so if people tend to review, 
please vote also).


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] sms-resend-retry error

2006-05-13 Thread Stipe Tolj

Mi Reflejo wrote:


From bug:


http://bugs.kannel.org/view_bug_advanced_page.php?f_id=341

Problem:
Whenever there is submit_sm_resp failure, the submit_sm is going on
endlessly, instead of N retries.

Explanation:
The problem exists because variable++ increments variable by one but
returns always variable without the increment. so the line:
sms-sms.resend_try = (sms-sms.resend_try  0 ? sms-sms.resend_try++ : 
1);

is always setting sms-sms.resend_try to 1 or to sms-sms.resend_try

Solution:
With value+1instead the problem is fixed.

Already tested and it's working.

Attaching the PATCH.

Regards,
Martín Conte


+1, commited to cvs. Thanks a lot.

Also bug report resolved.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Kannel store format and PHP

2006-05-15 Thread Stipe Tolj

Alex Kinch wrote:


Don't suppose anyone knows how to read the Kannel store into PHP?


Hi Alex,

you would have to do all the usual text parsing line orientated.

Even I can't imagine what the purpose of parsing a Kannel store file is from out 
of PHP? Can you shade some light on it?


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATH] Possible buffer overflow gateway/gw/smsc/smsc_emi_x25.c

2006-05-15 Thread Stipe Tolj

Davy Chan wrote:


Hello Humberto,

I applaud your effort but the use of dynamically allocated buffers
verse statically allocated buffers does not alleviate the buffer-overflow
problem. It mitigates trash-writing to somewhere else. Additionally, using
dynamically allocated buffers does slow the system down and, potentially,
generate a Kannel PANIC.

Also, some of the code you pointed to uses information from the
Kannel configuration file (e.g. the serial device filename for the
emi_x25). I feel we should document the length limitation in the
userguide and let the person configuration shoot himself/herself
in the foot if they go beyond it. If we are kind, then we can provide
'%s' precision to limit their inputted value to conform to the
stated acceptable length.

But, I do agree with you in the code sections were the information is
coming from outside our control. For those sections, we should use
'%s' precision and maybe even snprintf() for that belt-and-suspender
feeling.

Did you get your ideas for the changes through an automated
buffer-overflow checking application? It appears that many of the
suggestions didn't take into effect the coding around the proposed
fix.

More comments inline...


agree'ing to Davy partly.

I have addressed these symptoms also in a private branch. This needs to be 
cleaned down and commited.


How far has the processing logic been considered in the patch?

@Davy, you seem to picked-up this. Can you go for a cleanup round and provide a 
clean patch to commit for?


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Kannel Installation on Solaris 9 - port 8080 and 9201 issue

2006-05-15 Thread Stipe Tolj

OLOTU Olayinka wrote:


Thanks.
Now my kannel wap runs on Solaris.
i configured my phone and ran some tests. the phone connects to wap and browses 
nicely when it is set to use port 9201, but when i try port 8080 i get no 
connection at all.
please how can i configure kannel to accept wap connections from ports 8080 and 
9201 at the same time.
Thanks


I guess you consider port 8080 to act as a pure HTTP (or even WHTTP) proxy for 
more recent phones (WAP 2.0). Kannel does not support HTTP proxying itself. You 
can utilize good known components as Apache or squid to act as HTTP proxy for 
that purpose.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: get-url doubt

2006-05-15 Thread Stipe Tolj

vinodkumar wrote:


hi,

when get-url will hit?.
is it at time of hand our to smsc??


no, the get-url inside a sms-service is called when a MO message is received 
from the SMSC side.


So sms-service groups are always MO initiated.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Please be gentle...

2006-05-15 Thread Stipe Tolj

Rene Kluwen wrote:


I think there IS a roadmap with an upcoming new stable version.
Stipe and Alexander might be able to tell a little bit about it.
I know they are working hard to achieve the goal (the goal being the new
release).

AFAIK, it is a matter of a few pending bugs that are supposed to be solved
before the
release can be called stable.


yep, there are... that's why things keep pending. The problematics arround this 
is, new patches come in almost every day. We don't complain about this, because 
that's what we all want: contribution. Of course new patches consume time for 
review, analysis etc. Alex and me, including Rene and Vincent and even more 
people try to push the wheel as much as possible.


Personally I had an issue in the WTP-SAR code that I was after with Carlos and 
Mindaugaus, which has been fixed partly.


I'll go for a release without a more sophisticated resolve of that. Meaning it 
will be stable for the WTP-SAR client part under certain considerations, but 
in general will be. Those who are affected will know.



Personally I think Kannel is not yet an untamed beast of code by far. There
is strict
coding guidelines that are being actively enforced.


I agree.


I see some things on the back sides as well, but will respect the subject ;)


yep, we're of course not perfect. We have a lot of open construction sides, 
beside the generic thing we are about to do: the release. Ie. new kannel.org web 
site using a CMS system, ie. drupal, getting rid of old bug reports from mantis, 
so we have a cleaner state in there.


I have to agree that there exists several parallel source branches of Kannel. 
Those are mainly maintained for personal reasons. That's ok with us. But the 
main HEAD stream should always be kannel.org. Anyone having additions or changes 
must relly that changes in the official tree are always the best known quality.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Bug in smsc_at

2006-05-23 Thread Stipe Tolj

Andrija Petrovic wrote:

Version 30 of smsc_at.c is buggy, due to wrong condition for 
octstr_len(temp).

Changed the condition...


thanks a lot, commited by Alex to cvs.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] Typo in smsc_smpp.c

2006-05-29 Thread Stipe Tolj

Tom Sommer wrote:


Nasty typo that's been there for years

Basically BUFFRED - BUFFERD

Patch attached

// Tom Sommer




--- org/kannel-snapshot/gw/smsc/smsc_smpp.c 2006-05-15 20:24:40.0 
+0200
+++ kannel-snapshot/gw/smsc/smsc_smpp.c 2006-05-29 14:28:17.0 +0200
@@ -1231,7 +1231,7 @@
 dlrstat = DLR_SUCCESS;
 else if (stat != NULL  (octstr_compare(stat, octstr_imm(ACCEPTD)) 
== 0 ||
 octstr_compare(stat, octstr_imm(ACKED)) == 0 ||
-octstr_compare(stat, octstr_imm(BUFFRED)) == 0 ||
+octstr_compare(stat, octstr_imm(BUFFERD)) == 0 ||
 octstr_compare(stat, octstr_imm(ENROUTE)) == 0))
 dlrstat = DLR_BUFFERED;
 else


Hi Tom,

yep, +1 from my side, this seems a obvious typo.

Even while this is not included in the example section of appendix B of SMPP 
v3.4 spec, I'm +1 for fixing this.


Anyone having objections? I don't hope someone tailored a SMPP server according 
to this, so they break ;)


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Push Proxy Gateway Problem

2006-06-01 Thread Stipe Tolj

Denis Gerasimov wrote:

Hello list,

 


I have a problem with PPG. When I try to send a test wap push message
(either provided in docs at
http://www.kannel.org/download/1.4.0/userguide-1.4.0/userguide.html#AEN4615
or generated manually), message is not delivered and I see the following
error in the wapbox.log:

 


2006-05-30 04:56:45 [15744] [14] WARNING: PPG: No MIME content received, the
request unacceptable

2006-05-30 04:56:45 [15744] [14] DEBUG: PPG: send_bad_message_response:
telling pi

 


Actually MIME is passed in the urlencoded message the way I found in
contrib/web/sendsms/php file.

 


What is the problem? I am new to Kannel and WAP so any hints would be highly
appreciated!


Please use the test/test_ppg client for testing the PPG.

Files that are in the contrib directory are not reviewed/controlled or supported 
in any way. They may be outdated or simply syntaxing has changed.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Problems compiling on redhat 8

2006-06-01 Thread Stipe Tolj

Giulio Harding wrote:

Stuart Beck wrote:


Hi,

I recently downloaded and successfully compiled Kannel from the CVS
repository on a redhat FC5 box, however when I attempt to compile kannel
on redhat 8 I am getting a problem with libbind which does not exist on
a RH8 box.

I initially could not complete the configure option until i disabled ssl
support as it was complaining during the multithreaded ssl check.

It turns out the complaint is actually from an attempt to use the
libbind library which is now a problem on compilation vis

gcc -D_REENTRANT=1 -I. -Igw  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-DBROKEN_PTHREADS=1 -I/usr/include/libxml2 -rdynamic -o wmlscript/wmlsc
wmlscript/wmlsc.o libgw.a libwmlscript.a libwap.a libgwlib.a -lrt -lbind
-lresolv -lnsl -lm  -lpthread -L/usr/lib -lxml2 -lz -lpthread -lm
/usr/bin/ld: cannot find -lbind
collect2: ld returned 1 exit status

Can anyone tell me what dependencies I might be missing/requiring to get
kannel to compile on the redhat 8 system.



Never mind, we managed to compile libbind from source on the RH8 server, 
and that let us compile Kannel CVS - problem solved :)


that's more considered like a kludge to me ;)

Taking into account that RH8 is not really a new thing, we may get a fix here, 
if you guys may provide us access to a machine running that distro.


Otherwise we'd need to setup a VMware instance with it and dig into it. Since 
it's an issue that's not accurate for the distro, I'd suggest you guys provide 
us ssh access and we can have a quick fix on it.


But this is more a +0 task. We have more urgent issues. This would be only a 
time filler ;)


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: [PATCH] Typo in smsc_smpp.c

2006-06-01 Thread Stipe Tolj

Rene Kluwen wrote:

So how does this fit into the policy of strictly following SMPP specs?


that fits...  ;)

The issue is that the DLR string states are _NOT_ declared in the spec, it's 
only an example suggestion. Unfortunatly... and, the buffered variant isn't 
even included in the example section.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



[PATCH] config definition file hooking (for external modules), ie. sqlbox, mbuni, etc.

2006-06-02 Thread Stipe Tolj

Hi list,

now, as Kannel maintains its own way of knowing what config directives are 
allowed in group sections, this is a problem if external modules, ie. Rene's 
sqlbox or Paul's Mbuni need to use the same gwlib/cfg.[ch] thingies.


I tried to introduce a generic hooking mechanism for the 2 functions 
is_allowed_in_group() and is_single_group() that use the #include cfg.def for 
the core.


Now extenal modules can use cfg_add_hooks(void *a, void *b) to offer their own 
version of these 2 routines and hence #include foobar-cfg.def in their own 
code space.


The hooks are appended to a list and a wrapper loops arround the functiokns in 
the lists to get a boolean value.


I know that this is not the most elegant way. Alex suggested using dlopne() and 
dlsym(), which are of course a better approach, but still we need to 
concatenate the defined groups and I had no idea how to do.


Please review and vote.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---
### Eclipse Workspace Patch 1.0
#P gateway-cvs
Index: gwlib/cfg.h
===
RCS file: /home/cvs/gateway/gwlib/cfg.h,v
retrieving revision 1.14
diff -u -r1.14 cfg.h
--- gwlib/cfg.h 11 Feb 2005 15:35:48 -  1.14
+++ gwlib/cfg.h 2 Jun 2006 15:33:27 -
@@ -73,6 +73,7 @@
 Cfg *cfg_create(Octstr *filename);
 void cfg_destroy(Cfg *cfg);
 int cfg_read(Cfg *cfg);
+void cfg_add_hooks(void *allowed, void *single);
 
 CfgGroup *cfg_get_single_group(Cfg *cfg, Octstr *name);
 List *cfg_get_multi_group(Cfg *cfg, Octstr *name);
Index: gwlib/cfg.c
===
RCS file: /home/cvs/gateway/gwlib/cfg.c,v
retrieving revision 1.30
diff -u -r1.30 cfg.c
--- gwlib/cfg.c 11 Feb 2005 15:35:48 -  1.30
+++ gwlib/cfg.c 2 Jun 2006 15:33:27 -
@@ -152,7 +152,16 @@
 };
 
 
-static int is_allowed_in_group(Octstr *group, Octstr *variable)
+/
+ * Section providing hooks to external modules to apply their specific
+ * is_allowed_in_group() and is_single_group() with their own
+ * foobar-cfg.def.
+ */
+
+static List *allowed_hooks;
+static List *single_hooks;
+
+static int core_is_allowed_in_group(Octstr *group, Octstr *variable)
 {
 Octstr *groupstr;
 
@@ -181,7 +190,7 @@
 }
 
 
-static int is_single_group(Octstr *query)
+static int core_is_single_group(Octstr *query)
 {
 #define OCTSTR(name)
 #define SINGLE_GROUP(name, fields) \
@@ -195,6 +204,43 @@
 }
 
 
+static int is_allowed_in_group(Octstr *group, Octstr *variable)
+{
+long i;
+int r = 0;
+
+for (i = 0; i  gwlist_len(allowed_hooks); ++i) {
+r += ((int(*)(Octstr *, Octstr *))
+gwlist_get(allowed_hooks, i))(group, variable);
+}
+
+return (r  0);
+}
+
+
+static int is_single_group(Octstr *query)
+{
+long i;
+int r = 0;
+
+for (i = 0; i  gwlist_len(single_hooks); ++i) {
+r += ((int(*)(Octstr *))
+gwlist_get(single_hooks, i))(query);
+}
+
+return (r  0);
+}
+
+
+void cfg_add_hooks(void *allowed, void *single)
+{
+gwlist_append(allowed_hooks, allowed);
+gwlist_append(single_hooks, single);
+}
+
+
+
+
 static int add_group(Cfg *cfg, CfgGroup *grp)
 {
 Octstr *groupname;
@@ -247,6 +293,14 @@
 cfg-filename = octstr_duplicate(filename);
 cfg-single_groups = dict_create(64, destroy_group);
 cfg-multi_groups = dict_create(64, destroy_group_list);
+
+   /* make sure we put our own core hooks into the lists */
+allowed_hooks = gwlist_create();
+single_hooks = gwlist_create();
+
+gwlist_append(allowed_hooks, core_is_allowed_in_group);
+gwlist_append(single_hooks, core_is_single_group);
+
 return cfg;
 }
 


Re: [PATCH] config definition file hooking (for external modules), ie. sqlbox, mbuni, etc.

2006-06-02 Thread Stipe Tolj

Stipe Tolj wrote:

Hi list,

now, as Kannel maintains its own way of knowing what config directives 
are allowed in group sections, this is a problem if external modules, 
ie. Rene's sqlbox or Paul's Mbuni need to use the same gwlib/cfg.[ch] 
thingies.


I tried to introduce a generic hooking mechanism for the 2 functions 
is_allowed_in_group() and is_single_group() that use the #include 
cfg.def for the core.


Now extenal modules can use cfg_add_hooks(void *a, void *b) to offer 
their own version of these 2 routines and hence #include 
foobar-cfg.def in their own code space.


The hooks are appended to a list and a wrapper loops arround the 
functiokns in the lists to get a boolean value.


I know that this is not the most elegant way. Alex suggested using 
dlopne() and dlsym(), which are of course a better approach, but still 
we need to concatenate the defined groups and I had no idea how to do.


Please review and vote.


BTW, there is no logic change or behaviour change for the normal core Kannel. It 
will put it's own core_foobar() functions into the list and process on them 
only, in case no external module add hooks here.


So, nothing that harms existing configs.

Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



<    3   4   5   6   7   8   9   10   11   12   >