Re: access.log

2002-10-17 Thread Harrie Hazewinkel


--On Thursday, October 17, 2002 10:41 AM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

Andy Elacion, Jr. schrieb:


There are times that our subscriber would like to verify their
transactions and we have hard time in doing this.  We do it manually
like grep the accesslog for a particular cell no and it give us a pain.
Another thing is to monitor the reply of our system.


hehe, we know about that ;)

A MySQL support for logging may be added in the future. But to be
honest I'm more interested in getting a Kannel module API done before
embedding to much individual external software support into it.


I was thinking of the same. Having such an API makes this all way more
easy.


Stip,e have you looked at that module API I once posted??


Harrie

Internet Management Consulting
mailto:harrie;mod-snmp.comhttp ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





RE: MMS Task Force

2002-09-12 Thread Harrie Hazewinkel

HI Alex,

--On Thursday, September 12, 2002 5:02 PM +0100 Alex Judd 
[EMAIL PROTECTED] wrote:

 Agreed. The main priority should be to be complete the functionality
 needed to be able to send and recieve messages to and from a variety of
 different 1st phase released MMS-Cs as per the current live v1 WAP MMS
 protocol implementation.

Since there were also some question like 'I don't know it all??'
maybe it is wise to create a web page that provides links to specific
(useful) documents.


 From this point of view adding complete support for SAR is one of the
 current blocks and we have a good start in this area with the recent
 submissions. Testing is obviously needed here and access to the amount of
 software/hardware you have would be great.

 Potentially I would also suggest a seperate cvs branch which can be
 developed on without breaking the rest of the functionality. As most of us
 here use the cvs version of Kannel as staging (or often as live), I'd like
 to make sure that the changes don't stop the bug fixes.

I agree here. It was the way forward I see too.
The branch also allows the group to experiment more.


 Stipe - any thoughts?

Some time ago he mentioned he would be on vacation.
That could be now, since he mostly reacts quickly.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: FW: query on kannel usage.

2002-09-06 Thread Harrie Hazewinkel



--On Friday, September 6, 2002 3:01 PM +0530 Anupama R 
[EMAIL PROTECTED] wrote:

 Hello,
 Posted this message to users list.  Got no response :((
 We are proposing to use the gateway for our product.
 Is this okay?  Can anyone please reply?

I suggest you read the file COPYING.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: Kannel automatic compilation test

2002-09-04 Thread Harrie Hazewinkel



--On Wednesday, September 4, 2002 10:10 AM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 Stipe,

 Would this patch solve it. Not knowing the protocol spec of SMASI.

 I can try. But I took the code from smsc_smpp.c as template and AFAIK,
 they had no such mungy p = *(p); thingies :))

I came up with this, since it is already in some places of the SMASI
code. Since I believe you wanted a NO-OP function, but this is
mainly an attempt to read your mind.


 Stipe


 Harrie Hazewinkel schrieb:

 Stipe,

 Would this patch solve it. Not knowing the protocol spec of SMASI.

 Index: smasi_pdu.c
 ===
 RCS file: /home/cvs/gateway/gw/smsc/smasi_pdu.c,v
 retrieving revision 1.2
 diff -u -r1.2 smasi_pdu.c
 --- smasi_pdu.c 19 Aug 2002 09:15:16 -  1.2
 +++ smasi_pdu.c 3 Sep 2002 12:16:21 -
 @@ -140,7 +140,7 @@
  }

  switch (pdu-type) {
 -#define NONTERMINATED(name)
 +#define NONTERMINATED(name) p = *(p);
  # define COMATERMINATED(name) \
  if (p-name != NULL) { octstr_append_cstr(os, #name); \
  octstr_append_char(os, '='); \
 @@ -177,8 +177,8 @@
  type_name = (temp ? octstr_get_cstr(temp) : );

  if (strcmp(type_name, dummy) == 0) type = 0;
 -#define NONTERMINATED(name)
 -#define COMATERMINATED(name)
 +#define NONTERMINATED(name) p = *(p);
 +#define COMATERMINATED(name) p = *(p);
  # define PDU(name, id, fields) \
  else if (strcmp(type_name, #name) == 0) type = id;
  # include smasi_pdu.def
 @@ -191,7 +191,7 @@
  skip_until_after_colon(data_without_len, pos);

  switch (type) {
 -#define NONTERMINATED(name)
 +#define NONTERMINATED(name) p = *(p);
  # define COMATERMINATED(name) \
  if (octstr_str_compare(field_name, #name) == 0 
 field_value != NULL) \
  p-name = octstr_duplicate(field_value);
 @@ -226,7 +226,7 @@
  debug(sms.smasi, 0, SMASI PDU %p dump:, (void *) pdu);
  debug(sms.smasi, 0,   type_name: %s, pdu-type_name);
  switch (pdu-type) {
 -#define NONTERMINATED(name)
 +#define NONTERMINATED(name) p = *(p);
  # define COMATERMINATED(name) \
  octstr_dump_short(p-name, 2, #name);
  # define PDU(name, id, fields) \




Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: WSP TO HTTP SLOW !!

2002-09-04 Thread Harrie Hazewinkel



--On Wednesday, September 4, 2002 6:32 PM -0700 denzel [EMAIL PROTECTED] 
wrote:


 HI all !

We sent a large messege ( 16k ) from the phone to the kannel wap
 gateway (posting large message content to a url). The message was posted
 ok. But it took a lot time to complete ( around a minute ). Debug output
 shows that the bottleneck is with the wsp trying to write the content to
 http socket. Does anyone know why ?

I can only guess, for instance a slow connection to the HTTP server,
but if you provide more info such as the debug output you refer to it
would help. Also, how quickly was the message send from the phone and
received in the gateway, maybe that was the reason why it took a minute
to write the complete message to the HTTP socket.


cheers,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: Kannel Http SMSC

2002-09-03 Thread Harrie Hazewinkel

Hi,

I am not sure if I understand it correctly.

You have Kannel speaking to an SMSC with HTTP
and now you want to place an HTTP proxy is in the middle??


  Please view in a fixed-width font such as Monaco or Courier.

 +--+ ++ +-+
 |  | || | |
 |KANNEL| |  PROXY | |   SMSC HTTP |
 |  +-++-+ |
 |  | || | |
 |  | || | |
 |  | || | |
 +--+ ++ +-+


I would say as long the proxy allows HTTP request to be passed
(and of course the network functions properly) and I am assuming that
the proxy does not change the HTTP re   quests.

Kannel can reach the SMSC HTTP where it normally should have
invoked its HTTP requests on the SMSC directly.

Is this what you mean??

Harrie

--On Tuesday, September 3, 2002 4:43 AM -0700 Atef lotfy 
[EMAIL PROTECTED] wrote:

 Dear Sirs,
 I have kannel development ver 1.1.6. I want to
 configure kannel SMSC to be an HTTP,however,Kannel
 lies behind a proxy. Are the HTTP SMSC http requests
 forwarded also from the proxy server configurations in
 the bearer box Or these configurations are only for
 http requests for SMS service?
  Please Advice,
Atef Lotfy



Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: Kannel automatic compilation test

2002-09-03 Thread Harrie Hazewinkel

Hi All,

--On Tuesday, September 3, 2002 7:06 AM +0100 kannel 
[EMAIL PROTECTED] wrote:

 Kannel compilation test.

 Host: Linux geodude.3glab.org 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686
 unknown

 Kannel compilation had warnings or failed.

the warnings on the unused variable are caused by an
expansion of the 'define macros' into code like this.


case
0x0002 : { struct  LogonConf  *p = pdu-u. LogonConf ;

  } break;

which is on its turn a result of this code for the define:
#define PDU(name, id, fields) \
case id: { struct name *p = pdu-u.name; fields } break;

and this definition:

PDU(LogonConf,
0x0002,
HEADER
)

where I believe the HEADER variable is defined as NONTERMINATED.

The define of NONTERMNIATED is defined as
#define NONTERMINATED(name)

This goes for the warnings
In file included from gw/smsc/smasi_pdu.c:151:
gw/smsc/smasi_pdu.def: In function `smasi_pdu_pack':
gw/smsc/smasi_pdu.def:32: warning: unused variable `p'
gw/smsc/smasi_pdu.def:49: warning: unused variable `p'
gw/smsc/smasi_pdu.def:143: warning: unused variable `p'
gw/smsc/smasi_pdu.def:148: warning: unused variable `p'


Stipe, hope this helps you to fix it, since you added
this SMASI SMSC.

Harrie


 Output of 'make -s':
 In file included from gw/smsc/smasi_pdu.c:151:
 gw/smsc/smasi_pdu.def: In function `smasi_pdu_pack':
 gw/smsc/smasi_pdu.def:32: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:49: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:143: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:148: warning: unused variable `p'
 In file included from gw/smsc/smasi_pdu.c:213:
 gw/smsc/smasi_pdu.def: In function `smasi_pdu_unpack':
 gw/smsc/smasi_pdu.def:32: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:49: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:143: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:148: warning: unused variable `p'
 In file included from gw/smsc/smasi_pdu.c:234:
 gw/smsc/smasi_pdu.def: In function `smasi_pdu_dump':
 gw/smsc/smasi_pdu.def:32: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:49: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:143: warning: unused variable `p'
 gw/smsc/smasi_pdu.def:148: warning: unused variable `p'
 gwlib/http.c: In function `http_send_reply':
 gwlib/http.c:1976: warning: unused variable `p'
 test/test_cfg.c: In function `main':
 test/test_cfg.c:6: warning: `ret' might be used uninitialized in this
 function ---

 Output of 'CFLAGS='-Wall -O2 -g' ./configure':
 creating cache ./config.cache
 checking cvs checkout date... 20020902

 Configuring for Kannel gateway version cvs-20020902 ...

 Running system checks ...
 checking host system type... i686-pc-linux-gnu
 checking for gcc... gcc
 checking whether the C compiler (gcc -Wall -O2 -g ) works... yes
 checking whether the C compiler (gcc -Wall -O2 -g ) is a
 cross-compiler... no checking whether we are using GNU C... yes
 checking whether gcc accepts -g... yes
 checking for a BSD compatible install... /usr/bin/install -c
 checking for ranlib... ranlib
 checking for bison... bison -y
 checking for flex... flex
 checking for yywrap in -lfl... yes
 checking for convert... /usr/X11R6/bin/convert
 checking for perl... /usr/bin/perl
 checking for log in -lm... yes
 checking for accept in -lsocket... no
 checking for inet_ntoa in -lnsl... yes
 checking for inet_ntop in -lresolv... yes
 checking for inet_ntop in -lbind... no
 checking for pthread_exit in -lpthread... yes
 checking for pthread_exit in -lc_r... no
 checking how to run the C preprocessor... gcc -E
 checking for ANSI C header files... yes
 checking for sys/ioctl.h... yes
 checking for sys/time.h... yes
 checking for sys/types.h... yes
 checking for unistd.h... yes
 checking for sys/poll.h... yes
 checking for pthread.h... yes
 checking for getopt.h... yes
 checking for syslog.h... yes
 checking for gettimeofday... yes
 checking for select... yes
 checking for socket... yes
 checking for strdup... yes
 checking for getopt_long... yes
 checking for getopt... yes
 checking for socklen_t in sys/socket.h... yes
 checking for getopt in stdio.h... no
 checking for getopt in unistd.h... yes

 Checking POSIX threads support ...
 checking for working pthreads... no

 Checking for libxml2 support ...
 checking for xml2-config... /usr/bin/xml2-config
 checking libxml version... 2.3.11

 Configuring DocBook support ...
 checking for jade... jade
 checking for jadetex... jadetex
 checking for pdfjadetex... pdfjadetex
 checking for dvips... dvips
 checking for fig2dev... fig2dev
 checking for convert... /usr/X11R6/bin/convert
 checking for
 /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl... no
 checking for /usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl...
 yes checking for
 /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl... no
 checking for
 /usr/lib/sgml/stylesheets/nwalsh-modular/print/docbook.dsl... yes
 

Re: Kannel automatic compilation test

2002-09-03 Thread Harrie Hazewinkel

Stipe,

Would this patch solve it. Not knowing the protocol spec of SMASI.


Index: smasi_pdu.c
===
RCS file: /home/cvs/gateway/gw/smsc/smasi_pdu.c,v
retrieving revision 1.2
diff -u -r1.2 smasi_pdu.c
--- smasi_pdu.c 19 Aug 2002 09:15:16 -  1.2
+++ smasi_pdu.c 3 Sep 2002 12:16:21 -
@@ -140,7 +140,7 @@
 }

 switch (pdu-type) {
-#define NONTERMINATED(name)
+#define NONTERMINATED(name) p = *(p);
 #define COMATERMINATED(name) \
 if (p-name != NULL) { octstr_append_cstr(os, #name); \
 octstr_append_char(os, '='); \
@@ -177,8 +177,8 @@
 type_name = (temp ? octstr_get_cstr(temp) : );

 if (strcmp(type_name, dummy) == 0) type = 0;
-#define NONTERMINATED(name)
-#define COMATERMINATED(name)
+#define NONTERMINATED(name) p = *(p);
+#define COMATERMINATED(name) p = *(p);
 #define PDU(name, id, fields) \
 else if (strcmp(type_name, #name) == 0) type = id;
 #include smasi_pdu.def
@@ -191,7 +191,7 @@
 skip_until_after_colon(data_without_len, pos);

 switch (type) {
-#define NONTERMINATED(name)
+#define NONTERMINATED(name) p = *(p);
 #define COMATERMINATED(name) \
 if (octstr_str_compare(field_name, #name) == 0  
field_value != NULL) \
 p-name = octstr_duplicate(field_value);
@@ -226,7 +226,7 @@
 debug(sms.smasi, 0, SMASI PDU %p dump:, (void *) pdu);
 debug(sms.smasi, 0,   type_name: %s, pdu-type_name);
 switch (pdu-type) {
-#define NONTERMINATED(name)
+#define NONTERMINATED(name) p = *(p);
 #define COMATERMINATED(name) \
 octstr_dump_short(p-name, 2, #name);
 #define PDU(name, id, fields) \


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: Kannel Http SMSC

2002-09-03 Thread Harrie Hazewinkel



--On Tuesday, September 3, 2002 5:17 AM -0700 Atef lotfy 
[EMAIL PROTECTED] wrote:

 Dear Sir,
 Thank you for your response. what I really want to do
 is to make kannel connects to an SMSC Http which is a
 web site (www.deltica.com) that has an http client
 interface to send SMS. kannel itself is behind an http
 proxy ( as in your drawing). The problem is that I
 have configured Kannel to use http proxy,but Kannel
 always fails to connect although the site and the
 proxy are working well.
 Kannel always gives me:
 connect failed
 system error 128: Network is unreachable
 error connecting to server at port 80

 Can you help me fixing this ?

I can try.

So far it looks to me more a network problem were you cannot
connect to the proxy on port 80 from the kannel system.

Can you try to connect to port 80 on the proxy with the command:
$ telnet proxy-hostname 80
Trying some IP...
Connected to proxy-hostname.
Escape character is '^]'.


At this point you have a tcp connection to the proxy on port 80.

2 returns should close it for you.



 --- Harrie Hazewinkel [EMAIL PROTECTED] wrote:
 Hi,

 I am not sure if I understand it correctly.

 You have Kannel speaking to an SMSC with HTTP
 and now you want to place an HTTP proxy is in the
 middle??


   Please view in a fixed-width font such as Monaco
 or Courier.

  +--+ ++
 +-+
  |  | || |
   |
  | KANNEL| |  PROXY | |
 SMSC HTTP |
  |  +-++-+
   |
  |  | || |
   |
  |  | || |
   |
  |  | || |
   |
  +--+ ++
 +-+


 I would say as long the proxy allows HTTP request to
 be passed
 (and of course the network functions properly) and I
 am assuming that
 the proxy does not change the HTTP requests.

 Kannel can reach the SMSC HTTP where it normally
 should have
 invoked its HTTP requests on the SMSC directly.

 Is this what you mean??

 Harrie

 --On Tuesday, September 3, 2002 4:43 AM -0700 Atef
 lotfy
 [EMAIL PROTECTED] wrote:

  Dear Sirs,
  I have kannel development ver 1.1.6. I want to
  configure kannel SMSC to be an HTTP,however,Kannel
  lies behind a proxy. Are the HTTP SMSC http
 requests
  forwarded also from the proxy server
 configurations in
  the bearer box Or these configurations are only
 for
  http requests for SMS service?
   Please Advice,
 Atef Lotfy
 


 Internet Management Consulting
 mailto:[EMAIL PROTECTED]http
 ://www.mod-snmp.com/

 ---
 Author of MOD-SNMP, enabling SNMP management to the
 Apache server.



 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com




Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: [PATCH] SMPP

2002-08-13 Thread Harrie Hazewinkel

HI Alan,

--On Wednesday, August 14, 2002 10:13 AM +1200 Alan McNatty 
[EMAIL PROTECTED] wrote:

 Hi Nisan,

 Thanks for your patch this is also an issue for me. Can you update docs
 also - since new config parameter.

Does this patch fix also for you the problem??
(You state you have the problem, not that this fixes it)


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: [PATCH] smsc modules directory

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 12:20 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:

 Hi Harrie and everyone

 I saw that smsc.c was moved to the smsc module directory (which I don't
 think is write - as this is just the API implementation, not a module in
 itself), but the smsc.h file was left in the gw directory. you have to
 decide were to put these two files, but they should be together

Maybe you are correct. I was in doubt to move the smsc.c file
and smsc.h. I did move the smsc.c, since it was used under
the smscconn API.
Then smsc_wrapper is also moved and I consider that one
as an API and a module. It is an API for the old smsc module,
but it is a module since it is used from within the smscconn API.
I believe this is also due to some legacy and if wanted the
wrapper could be complete vapourized if the old smsc module would
be ported to the smscconn API.

One can argue many ways, but that is also due to the many ways
various layes and APIs are made.


The include file I left up there, actually incorrect.
This counts even so for the smsc_p.h include file.
I move them under the smsc directory.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.
  




Re: [PATCH] SMPP panic when sender or receiver address longer then20 characters.

2002-08-11 Thread Harrie Hazewinkel

Hi Oded,

Good catch.

Forgive if I sound stupid, but regarding the length of an address.
If it is really bigger then 20 can one just discard the part of the
address that is longer??
That sounds weird to me, or is the address only used internal in the
smpp part as some indication??

On top of your patch, would it not be better to have the length of an 
address
in some #define and use that?? Then changing the length is done in one place
only.

--On Sunday, August 11, 2002 1:00 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:

 Hi list

 We encountered a bug that causes SMPP to panic when creating the PDU if
 the receiver or sender address is longer then 20 characters. the panic
 occures in smpp_pdu.c in smpp_pdu_pack which asserts on the length of the
 source Octstr before packing it into the PDU. I don't want to change the
 assert, just make sure that it will not be invoked just because the user
 enetered bad data, so attached is this patch.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





RE: [PATCH] SMPP panic when sender or receiver address longerthen20 characters.

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 2:46 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 -Original Message-
 From: Oded Arbel
  in some #define and use that?? Then changing the length is
  done in one place
  only.

 it is - in the smpp_pdu.def :

 hm. my bad - this is not what you meant. doing as you suggested is more
 correct, but currently that number is only used in two lines of code (one
 right after the other) and I can't see how we can extract if from the
 pdu.def, so using it in a define has the single advantage of moving the
 defining point from halfway down the file to the top of the file (or to
 the header).

I admit these .def files are difficult, but I believe we need to make
a define and use that define +1 in the .def file to allcate the space
and use the define itself in the other places.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





RE: [PATCH] SMPP panic when sender or receiver address longerthen20 characters.

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 2:32 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 -Original Message-
 From: Harrie Hazewinkel [mailto:[EMAIL PROTECTED]]

 Hi Oded,

 Good catch.

 Forgive if I sound stupid, but regarding the length of an address.
 If it is really bigger then 20 can one just discard the part of the
 address that is longer??

 I don't know - I don't think that there are addresses longer then 20
 chars, and if there are - these can not be used with SMPP which only
 supports addresses as big as 20 chars. I'm not sure of the correct
 implementation here as I have yet to see any usage examples, but we can
 hold a hypothetical discussion in the list about how an address longer
 then 20 chars will look like and how it should be handled if the SMSC
 does not support such addresses.

Not that I want to have a hypothecial discussion, but just dropping
parts of an address looks weird to me. Maybe we also have to check
were the address is received if it is the correct length.
But anyway, making sure it is the  correct length like in your patch
is a good thing. It also protects against changes within Kannel
of the address.


 That sounds weird to me, or is the address only used internal in the
 smpp part as some indication??

 The receiver address is used as the target MSISDN for the SM and the
 sender address is used to inform the receiving party of who sent the SM
 and where to reply too. at least the later can be alpha numeric.

 On top of your patch, would it not be better to have the length of an
 address
 in some #define and use that?? Then changing the length is
 done in one place
 only.

 it is - in the smpp_pdu.def :
 snip
 PDU(submit_sm,
 0x0004,
 HEADER
 NULTERMINATED(service_type, 6)
 INTEGER(source_addr_ton, 1)
 INTEGER(source_addr_npi, 1)
 NULTERMINATED(source_addr, 21)
 INTEGER(dest_addr_ton, 1)
 INTEGER(dest_addr_npi, 1)
 NULTERMINATED(destination_addr, 21)
 /snip
 notice the dest_addr and source_addr which are defined as 21 chars null
 terminated buffers.

 --
 Oded Arbel
 m-Wise mobile solutions
 [EMAIL PROTECTED]

 +972-9-9581711 (116)
 +972-67-340014

 ::..
 ...[T]he lesson [comic books] taught children- or this child, at any
 rate- was  perhaps the unintentionally radical truth that exceptionality
 was the greatest  and most heroic of values; that those who were unlike
 the crowd were to be  treasured the most lovingly; and that this
 exceptionality was a treasure so  great that it had to be concealed, in
 ordinary life, beneath what the comic  books called a 'secret identity'.
   -- Salman Rushdie





Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





RE: [PATCH] SMPP panic when sender or receiver address longerthen20characters.

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 4:14 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 -Original Message-
 From: Harrie Hazewinkel [mailto:[EMAIL PROTECTED]]

 I admit these .def files are difficult, but I believe we need to make
 a define and use that define +1 in the .def file to allcate the space
 and use the define itself in the other places.

 K - how about like this ?

Cool. I am commiting this.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





CVS and cygwin

2002-08-11 Thread Harrie Hazewinkel

HI to all those working and committing from CYGWIN to CVS,


I just fixed some file with the '^M' problem. This is caused
in most cases by people who use cygwin and CVS. Those need to
use a native CVS and not the standard cygwin cvs.

The cygwin cvs lets the CVS server think it is a UNIX system, where
it is a windows system.
more info of native cvs can be found here:
http://www.cvshome.org/dev/codewindow.html


Hope this helps,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: [PATCH] Octstr function call sometime barf when calledwithNULL data

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 6:40 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 This will be in my next commit today.
 I also noticed some other things like ^M' at the end of
 lines in the ChangeLog and so on. I am going thru all this.

 this has been commited already. I have to veto against this and would
 like to request a revision step-back.

What is the real problem with it??
I think it is quite a nice solution (used also in other packages
I have seen).


Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/

Author of MOD-SNMP, enabling SNMP management the Apache HTTP server




Re: [PATCH] SMPP octstr to long handling

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 6:31 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:
 BTW, we should not #define constants of SMPP that are explicitely
 'defined' by the .def file anyway. So the 21 length for source and
 destination number is already a #define in this semantical way and
 hence we should *not* use #defined things in .def again.

Hm, I am not so in favour of doing length definitions this hardcoded
way. But it seems, that many thing get all the time done via
MACROs and depending on the use the marco results in different code.

This is more coding style, I guess.

 RCS file: /home/cvs/gateway/gw/smsc/smpp_pdu.c,v
 retrieving revision 1.1
 diff -r1.1 smpp_pdu.c
 136,138c136,147
  gw_assert(octstr_len(p-name)  max_octets); \
  if (p-name != NULL) octstr_append(os, p-name); \
  octstr_append_char(os, '\0');
 ---
 if (p-name != NULL) { \
 if (octstr_len(p-name) = max_octets) { \
 warning(0, SMPP: PDU element %s to long  \
 (length is %d, should be %d), \
 # name, octstr_len(p-name), max_octets); \
 temp = octstr_copy(p-name, 0, max_octets-1); \
 } else \
 temp = octstr_duplicate(p-name); \
 octstr_append(os, temp); \
 octstr_destroy(temp); \
 } \
 octstr_append_char(os, '\0');

This also means that you ignore the address part which goes beyond the
maximum length. Somehow, this feels not right, or do I miss something??




Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/

Author of MOD-SNMP, enabling SNMP management the Apache HTTP server




Re: [PATCH] Octstr function call sometime barf when called withNULL data

2002-08-11 Thread Harrie Hazewinkel



--On Sunday, August 11, 2002 6:38 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 While some Octstr functions handle NULLs gracefully, others (especially
 the formating ones) do not behave so gentlemen-like. this patch will
 cause NULLs received instead of Octstr* in some cases not to panic the
 box but instead be handled in a predictable manner.

 again -1 for this, sorry Oded.

 The NULL returns are very dangerious for functions that deal with
 XML output and hence you dump a null'ed Octstr as NULL cstr which
 oviously will break XML structures and semantics.

I see here the association with XML and I missed that.

--On Sunday, August 11, 2002 8:04 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 -Original Message-
 From: Stipe Tolj [mailto:[EMAIL PROTECTED]]

  Ok - you are correct here too :-). how about using (NULL)
 or [NULL] instead ?

 Hmm, what is exactly the problem with it now (or revision backed) is?
 I don't got the point I guess.

 this part :
 seems_valid_read(ostr,file,line,func);

 where if the parameter is NULL for some reason, bearerbox panics.


I am with Oded here. If a panic can be overcome by the functionality
it should be possible. Oded patch did this. Stipe, if you don't want
this solution another is to handle an error all the way up to where
you can recover, but panicing is to much.

And for (NULL)  or [NULL] I don't care. Indeed the NULL is to close
to XML.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: [PATCH] sms centers

2002-08-10 Thread Harrie Hazewinkel



--On Friday, August 9, 2002 12:45 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 so what does the patch do now?! I didn't get the point.

It would make the SMSC-code from within the wrapper more equal.
Not that it is so important, but afterwards the step to a
single modular API is easier. By making everything more equal
an API more or less surfaces, since the access to certain parts
are then always the same.

OK, one could say design a modular API and then enforce it,
but that requires the same kind of study on the code/functionality
and the change must still be done.

This is also why it could be that some patches of me look like
'why is it needed??'. It does not change/fix functionality, but
merely move parts of code. That is correct, but it has a goal
of ending up with a more modular package.
Whether it is worthwhile purchasing this long-term goal I only hope
it is worth my efforts.


However, this patch is for all the old wrapper SMSC code
which are likely to be dropped. Is it still worthwhile applying...


Hope this clarifies it,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: creating an smsc directory

2002-08-09 Thread Harrie Hazewinkel



--On Friday, August 9, 2002 12:30 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 Aarno Syvänen wrote:

 What about smpp_pdu.* modules ? These are part of smpp implementation.

 agreed, they should also go to gw/smsc.

 And don't forget about gw/emimsg.c which is for emi2.

Seem to have missed some. I move those too. Already testing the
move of those files.



Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/

Author of MOD-SNMP, enabling SNMP management the Apache HTTP server




Re: [FYI] critical bug in EMI2 module

2002-08-04 Thread Harrie Hazewinkel



--On Saturday, August 3, 2002 6:06 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 Hi all,

 we definitely have a critical bug in the smsc_emi2 module (as far as I
 have located). When a EMI2 connection gets in a state I can't define
 currently and the HTTP admin status page is triggered, hence the SMSC
 list is accessed, the whole bearerbox does a segmentation fault and
 dumps core. :((

 It does not happens as long bearerbox runs and noone tries to access
 the status page.

 I'm on the hunt for this one, because it's causing us here at Wapme
 some very urgent problems with productive SMSC links.

How is the locking of the information maintained. A wild guess is that
the threads maintaining the connection and associated data is
changed during  the creation of the status page. In other words
some pointer gets changed or some memory block gets freed and the
pointer is not made NULL and testing the pointer for not NULL would
make you think it is still there. Thus more locking is needed for
simultanious access of the data. I noticed that this is a problem
while making an SNMP extension.

 I'd like to release a new development version after we have fixed at
 least this and maybe 2 or 3 other things. Especially concerning the
 new HTTP request queueing in smsbox. I'll also try to add a status
 access information about smsbox's internal state.

WOuld do you want to do?? 1) branch of from 1.2.0 release and add the fixes
there or 2) take the current head and fix that??


 So who's +1 for releasing 1.1.7? Votes from the contributors please.
 BTW, is the version number plan right with 1.1.7 as development
 version, which is *newer* than 1.2.0 but the version number is less?!

I would advise against this. The numbering scheme is not inconsistent.
Almost every one would say 1.2.0 is a newer release then 1.1.7.
And this also depends on how and where you want to branch/tag from.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Telefoon simulators for UNIX/Solaris/MacOSX

2002-08-03 Thread Harrie Hazewinkel

HI,

I was wondering if someone else knows if there are phone simulators
that can be used in conjunction with Kannel.

I have found various Windows simulators, but I need
Unix/Solaris/MacOSX versions. (I don't have a windows system).


cheers,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





module API for Kannel

2002-08-02 Thread Harrie Hazewinkel

Hi,

I have updated the module API I proposed some time ago.
I have added thse to the website and you can find
the information of it at http://www.kannel.org/module_api/

The txt file is a general design explaination
the patch file is a patch that works against a cvs checkout
 of the date -D2002-8-2 12:00pm

Comments good or bad or welcome.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: request for comments: the -Wconversion warnings.

2002-08-01 Thread Harrie Hazewinkel



--On Wednesday, July 31, 2002 10:20 PM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 Harrie Hazewinkel wrote:

 The warnings generated by -Wconversion are enormous in amount.
 I have started to fix some (not even 25%) and one can look
 in the attached file.

 What do others think of this??

 hmm, what's the benefit from switching from -Wall to all various
 -Wfoobar?!

Most of these are just warnings of declarations which are not
correct, duplicate or missing.

However, the conversion warnings are a bit overdone maybe, but I
know of compilers which gives these warnings default.
IMHO, it is wise to check the sizes and so to make them
unsigned. However, I guess an unsigned int is enough where
in most cases an unsigned long is used.

For instance, I also saw once that an octet string function is
checked where the length value given as parameter is 0. If so the
function returns otherwise does things. However, it it never
tested if the value is negative and that was very well possible.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.
 




RE: sms gateway for ucp written is java

2002-08-01 Thread Harrie Hazewinkel



--On Thursday, August 1, 2002 2:59 PM +0300 Kaido Karner 
[EMAIL PROTECTED] wrote:

 forget about Java if you need a high-performance SMS gateway and take
 Kannel, contribute to development if it does not fit your needs in a
 specific way :)

 that you say .. I remember posting 2 obvious bugfixes .. none of them
 appear in cvs ..

Posted fixes are not always commited in CVS. One of the commiters
needs to have the time and understand what and how that perticular
big is fixed.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: compiler warnings

2002-07-31 Thread Harrie Hazewinkel

HI,

--On Wednesday, July 31, 2002 12:53 AM +0100 Bruno David Rodrigues 
[EMAIL PROTECTED] wrote:

 On Ter, 2002-07-30 at 10:07, Harrie Hazewinkel wrote:
 HI,

 I noticed that Stipe fixed compiler warnings after my patch.
 So I thought using '--enable-warnings' to have '-Wall' as compile
 option, but I would like to add additional warnings like
 '-Wmissing-prototypes' and '-Wmissing-declarations'.

 Yes, please, add every -W* required to full debug the compile process.
 I've added --enable-warnings to be able to use the -Wall everytime I
 make make


While adding the various -W* warnings I stumble accros various
warnings. I am trying to fix those. But the main one
is a signed/unsigned conversion. I believe we better fix these.
So, for instance, length and size variable should become all unsigned
I could take either unsigned long or size_t and would prefer to
use size_t for both is this OK with you all??



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





request for comments: the -Wconversion warnings.

2002-07-31 Thread Harrie Hazewinkel

HI,

The warnings generated by -Wconversion are enormous in amount.
I have started to fix some (not even 25%) and one can look
in the attached file.

What do others think of this??


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.



sus.patch
Description: Binary data


compiler warnings

2002-07-30 Thread Harrie Hazewinkel

HI,

I noticed that Stipe fixed compiler warnings after my patch.
So I thought using '--enable-warnings' to have '-Wall' as compile
option, but I would like to add additional warnings like
'-Wmissing-prototypes' and '-Wmissing-declarations'.

Or is the preference towards an extra '--enable-developer'
that includes these compile time options?? If I don't hear
compliants I add the to the '--enable-warnings'.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: another emi2 bugfix

2002-07-30 Thread Harrie Hazewinkel



--On Monday, July 22, 2002 1:34 PM +0300 Kaido Karner [EMAIL PROTECTED] 
wrote:

 re

 emi2 smsc connections by mistake increase received messages counter twice.

 patch is together with the previous fix in smsc_emi2.c


 diff -u gateway-1.2.0/gw/smsc_emi2.c gateway-patched/gw/smsc_emi2.c
 --- gateway-1.2.0/gw/smsc_emi2.cFri Jun 28 14:09:54 2002
 +++ gateway-patched/gw/smsc_emi2.c  Mon Jul 22 13:29:15 2002
[snip]
 @@ -1606,8 +1605,6 @@
  privdata-deny_ip = deny_ip;

  if (privdata-rport  0  emi2_open_listening_socket(privdata)  0)
 { -   gw_free(privdata);
 -   privdata = NULL;

I think I would prefer to have these combined into a single function.
gw_free now maps onto the gw_native_free or gw_check_free with macros.
We could make the macros as such that they pass the pointer to the
address space containing the pointer and make the pointer even NULL.


Then the define

#define gw_free(ptr) (gw_native_free(ptr))

 would be become

#define gw_free(ptr) (gw_native_free(ptr))

and then

void gw_native_free(void *ptr);

 would be become

void gw_native_free(void **ptr);


What do others think?? I guess that in more places the pointer needs
to be 'NULL'-ed after the free.



Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/

Author of MOD-SNMP, enabling SNMP management the Apache HTTP server 




RE: another emi2 bugfix

2002-07-30 Thread Harrie Hazewinkel



--On Tuesday, July 30, 2002 12:30 PM +0300 Kaido Karner [EMAIL PROTECTED] 
wrote:

 I think I would prefer to have these combined into a single function.
 gw_free now maps onto the gw_native_free or gw_check_free with macros.
 We could make the macros as such that they pass the pointer to the
 address space containing the pointer and make the pointer even NULL.

 What do others think?? I guess that in more places the pointer needs
 to be 'NULL'-ed after the free.

 I'd say no - this would propagate bad programming practices.

As for bad practises, you can see it that way. I however would
say it maps onto another function which can do more the 'free'
alone. IMHO, that warrants the change. It also protects developers.


What do others think??

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.
 




logging in Kannel

2002-07-23 Thread Harrie Hazewinkel

HI,

In order to make things more modular I have looked into the way
logging is handled in Kannel. To my horrible discovery there are
two kinds of logging in gwlib namely, access_log.[c|h] and
log.[c|h].
Accesslog is supposed to be a more simple API/function as the log
version. I also noticed accesslog is not even used in the wap
portion for instance.

So first question is:
Why is only in smsbox and bearerbox the accesslog used and not in
the wap portion?? No one interested in the accesslog there??
Or are people trying to get the access log part out of a generic
logfile containing also many (potentially) debug logs.


second question:
Would it not be easier to provide to the alog function only the Msg
structure (and maybe an extra note) where the alog function
determines the output format?? Now a 'const chat*fmt,'
is given.
OK, this looses flexibility, but it can unify all the formats
going into the accesslog. But a more common API would allow for
multiple logpaths when this layered. Meaning firs the common
logfunction is called in there depending on the module a different
logfunction.




Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: A small contribution to Kannel 1.1.6

2002-07-19 Thread Harrie Hazewinkel



--On Friday, July 19, 2002 1:22 PM +0100 James Wang [EMAIL PROTECTED] wrote:
  I proposed the above change on May 9, 2002.

  However, I found that the latest release, Kannel 1.2.0,
 still have not included this patch.

  Can anyone explain please?

I did not look at the originally porposed change, but if you
would propose a patch that can be applied instead of a description
on what to do that helps.
(making a patch diff -ru orig new  patchfile or something that
applies to your environment)


I believe many are busy with many things, so if you can make it
as easy for those who have commit access (by providing a patch)
it maybe will be picked up.


Hope this helps,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





after the release

2002-07-08 Thread Harrie Hazewinkel

HI all,

Since we now have a new release 1.2.0 I assume we will develop
on head again and do bugfixes in a branch. I laid low for a while
waiting for the release, but I am now going to add various
changes again.

My changes are in perticular aimed in making it
all more modular. Which sometimes just means making
things more equal and then combine those.

I will use the STATUS file to keep you up to date.
Major design changes I first will distribute to the list.

Harrie


---
Author of MOD-SNMP, enabling SNMP management to the Apache server.





Re: after the release

2002-07-08 Thread Harrie Hazewinkel

HI,

--On Monday, July 8, 2002 8:06 PM +0200 Harrie Hazewinkel 
[EMAIL PROTECTED] wrote:

 I will use the STATUS file to keep you up to date.
 Major design changes I first will distribute to the list.

Sorry, I ment Changelog.



Harrie





Re: smsbox terminating

2002-07-03 Thread Harrie Hazewinkel

HI,

Which version of Kannel is this?? 1.1.6, 1.2.0rc1 or CVS??

--On Wednesday, July 3, 2002 8:33 PM +0500 Cipher Strength 
[EMAIL PROTECTED] wrote:



 Operating System Redhat: 7.3
 Kannel Development Release

 Following is the smsbox last log

 2002-06-25 15:16:13 [0] INFO: Connection closed by the bearerbox
 2002-06-25 15:16:13 [0] INFO: Received (and handled?) 0 requests in
 928709 secon ds (0.00 per second)
 2002-06-25 15:16:13 [0] INFO: Kannel smsbox terminating.
 2002-06-25 15:16:13 [1] WARNING: Destroying fdset with 996 active entries.


 CIPHER


 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com






Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





Re: Kannel's module API

2002-06-11 Thread Harrie Hazewinkel

(resend, since it bounced due to wrong sender address)

Hi Stipe,

--On Tuesday, June 11, 2002 12:24 AM +0200 Stipe Tolj 
[EMAIL PROTECTED] wrote:

 Hi Harrie,

 I liked the document you wrote about Kannel's API structure. Hope that
 more of the other developers have a chance to review it. I'll have a
 deaper look into the patch itself.

The patch itself needs some updating, since some other changes
cause collisions. I will update it in a day or 2.


 IMO, the way apache-1.3 does the modularization may be addopted to
 Kannel for those API purposes. What do the the others think of this?

It is indeed based on that :-)) We even could do it based on the
Apache 2.0 api, but that is somehow trivial. The concept for now
is more important.


 Should we start re-constructing the current devel tree after we
 released 1.2.0 and keep a stable branch?

 I'm +1 for re-constructing

Not sure, what you mean here. But I assume you want
to branch for the 1.2.0 releases and development goes
into head, right??


 a) to a general autoconf layout, hence utilize libtool (yet no
 assigned volonteers here)

Using libtool is not directly my goal, but it seems to make
things as porting easier. I also believe that making the build
process a bit more fixed is not a bad thing. Now it creates some
libraries of arbitrary files and things can easily extended
where a new 'gmake .depend' seem to add

 b) for modularization using a Kannel API structure (Harrie will be
 leading this effort, because he's highly involved in Apache's API
 structure and has most experiences here IMO)

I don't have Kannel as some kind of day-job, unlike some of the others
here. Meaning as soon I have some paid-work that will get more priority.
But I am willing to lead this effort. I even would not mind working on
this for some company who needs it. :-))


 BTW, I'm working on a new Kannel web site (using PHP4 and MySQL) and
 other funny things ;)

Cool. What about ssh on the cvs server?? That would make things
more secure on that part too.




Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





Re: Daily patch: gateway

2002-05-31 Thread Harrie Hazewinkel



--On Friday, May 31, 2002 10:17 AM +0200 Stipe Tolj [EMAIL PROTECTED] 
wrote:

 Angel,

  File gateway/gw/bb.h changed from revision 1.5 to 1.6
  File gateway/gw/bb_smscconn.c changed from revision 1.45 to 1.46
  File gateway/gw/heartbeat.c changed from revision 1.2 to 1.3
  File gateway/gw/heartbeat.h changed from revision 1.1 to 1.2
  File gateway/gw/smsbox.c changed from revision 1.198 to 1.199
  File gateway/gw/smsc_smpp.c changed from revision 1.67 to 1.69
  File gateway/gw/wapbox.c changed from revision 1.148 to 1.149

 All this files have been changed without documentation on ChangeLog.

Some of those, I chnaged and I did not edit ChangeLog, since I thought
that was updated automatically with the CVS message provided at commit.

I will put the same message in ChangeLog. Sorry about that.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





RE: Daily patch: gateway

2002-05-31 Thread Harrie Hazewinkel



--On Friday, May 31, 2002 12:07 PM +0200 Angel Fradejas 
[EMAIL PROTECTED] wrote:

 Harrie please,

 Would you be so kind as to comment these changes in ChangeLog?

Done.

 They're somewhat described in a post from May 25 (subject: changes to the
 heartbeat code.)

 The message is the same as the commit message.
I personally, would prefer if the CVS-message during commit
is used for this.


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





Re: question regarding the configuration implementation

2002-05-31 Thread Harrie Hazewinkel



--On Friday, May 31, 2002 9:38 AM +0200 Stipe Tolj [EMAIL PROTECTED] 
wrote:

 Harrie Hazewinkel wrote:
 I was wondering if someone could tell me the reason why putting it
 in a dictionary first as a very general configuration representation
 and later search into it for only those parts needed??

 I'm not sure, but is the dictionary needed for faster lookups later
 when the groups are needed.

OK, but what is fast, you only do this at startup. :-)

The thing I merely was wondering of is why a 2 step phase.
First loading it all in the process and that as a second
phase look into the values of it.

See also below.


 Another question I have is why one would have all configuration tokens
 known to each process and depending on the process totally ignore it??
 The main reason is maybe that this way a single configuration file
 can be used for all, but I guess there is more.

 Hmm, I didn't understand the question Harrie.

I will explain it again.

The cfg.def, cfg.c and cfg.h file in the gwlib are the core of the
configuration handling. All tokens are known there. Those who are
not will cause an error while reading the configuration file.
All others are put into a list/dictionary for later use.
The later use by the process is just to call the ones it needs
from the list/dictionary. All others are basically ignored.

One could make it like this. Each process only knows those
tokens it will use. All other tokens will generate an error.
This as oppose to read all possible tokens of any of the
processes and just ignore those not used by that process.

Therefore, my question 'why should each process know all possible
tokens for all processes of the package and those not needed being
ignored by the process'??

I believe this is done so only one configuration file is needed
for the complete system (bearebox and wap/smsbox).
Howevr, this would make a more module system problematic, since not
all processes need the same module and thus do not know all the
same tokens.

Hope this explains it better.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





RE: CVS usage question??

2002-05-30 Thread Harrie Hazewinkel



--On Wednesday, May 29, 2002 5:54 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:

 It's possible, if your editing tool reformats tabs and removes spare
 spaces and such. try to diff all the changes agains the current cvs, and
 then edit the diffs and remove everything that isn't requires for the
 patch. then you can checkout from the CVS again, apply the diffs you've
 edited and commit.

The problem is ( I believe) that I do not see any difference with a cvs 
diff.
Except for those files I edited, but they show up all on the list with
cvs commit.

Could it be a problem that I have seen files with a ^M that are somehow
changes by cvs??

Alternatively, one can do a 'cvs up' to update and just see which
files are modified. That all looks OK to me.

 Alternativly you can either switch to another code editor, or - commit
 all the files anyway and hope that your editor will not change any more
 files.

I use 'vi'.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





RE: CVS usage question??

2002-05-30 Thread Harrie Hazewinkel



--On Wednesday, May 29, 2002 5:41 PM +0200 Angel Fradejas 
[EMAIL PROTECTED] wrote:

 Maybe line-feed format has been changed from unix-like to dos-like.

 This could happen if you use Windows based tools to edit, etc.

that could be it, see also my other email in which I mentioned the '^M'.
However, I noticed also that many files have a '^M' at the end.
So what would we prefer?

 Angel.


 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En
 nombre de Oded Arbel
 Enviado el: miércoles 29 de mayo de 2002 16:54
 Para: Harrie Hazewinkel; dev-kannel
 Asunto: RE: CVS usage question??


 It's possible, if your editing tool reformats tabs and removes spare
 spaces and such. try to diff all the changes agains the current cvs, and
 then edit the diffs and remove everything that isn't requires for the
 patch. then you can checkout from the CVS again, apply the diffs you've
 edited and commit.
 Alternativly you can either switch to another code editor, or - commit
 all the files anyway and hope that your editor will not change any more
 files.

 --
 Oded Arbel
 m-Wise Inc.
 [EMAIL PROTECTED]
 (972)-67-340014
 (972)-9-9581711 (ext: 116)

 ::..
 Was it Ritchie or Thompson who said about X:
   Sometimes, when you fill a vacuum, it still sucks?


 -Original Message-
 From: Harrie Hazewinkel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 29, 2002 2:29 PM
 To: dev-kannel
 Subject: CVS usage question??


 HI all,

 I wanted to commit changes in the gw directory. Although, only
 5 of the many files were changed. But in the 'cvs commit' it
 showed almost all files to be chnaged.

 Has anyone seen it before??


 Harrie

 Internet Management Consulting
 mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/








Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/




RE: Patch submission and release policy (Was: [PATCH] problemswithHTTPS and base support for per message billing)

2002-05-30 Thread Harrie Hazewinkel



--On Wednesday, May 29, 2002 4:41 PM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 Maybe it is also needed to establish of how many of the group
 should support or oppose to it before it is decided to what
 will be added.

 Something like this is needed when you have a one branch development.
 when you branch the developers away from the stable release - why bother
 ? everyone who has CVS access can commit features as long as care is
 take not to break anything and proper notification is done (current
 devel-reports is more then enought - just remember to document your
 changes in ChangeLog). only conceptual/architectual changes need to be
 discussed in the open.

Changelog is generated from the cvs commit messages or is it neccessary
to do it by hand?? Just wondering, since I thought ChangeLog can be
generated from CVS itself. (I could be wrong)


   - branch the tree now (yesterday would have been a good
 time too ;-)
   and label it 1.2.0.

 Why do you already want a branch??
 Why not putting the releases into a branch??
 (Just asking)
 Since this way you just can keep developing.

 As for a release I would suggest name it 1.2.0
 Make a branch of it and do new releases as 1.2.x
 Continue development in the main branch for 1.3.y.

 Semantics. I don't mind what you call it, as long as we have a stable
 branch and a development branch.

Fine, but I would think that you would at least want a different
branch for for instance the 1.2.x and the 1.3.y product/stable release.


  But for that, before thinking in branches and releases, we should
  think in the new architecture.

 I concur. The only thing is what kind of things do we put on the list.
 You already mentioned some. After what we have to define how indeed.

 Why bother - you can't make architectual changes w/o branching the tree
 - you need to get a declared stable release before rewriting the entire
 code base, so people will have something to put on their production
 servers while the project's next generation is in limbo.

What people should put on their production systems is something tested
and released as stable. I don't think that people should just take a
CVS checkout for the production system. Those poeple take a risk where
a released version should have been tested before release.
IMHO, that has not much to do with branching.

Besdies that I intended to say here that we first need to discuss
how the architecture will be and some of those other things. After
that we need to decide on the implementation and how to use branches.
Maybe some things are having very little impact and thus do not need
a special (own) branch.


Harrie

Internet Management Consulting
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/ 




RE: version 1.1.6 processing limits

2002-05-30 Thread Harrie Hazewinkel



--On Thursday, May 30, 2002 10:14 AM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:

 I'm not sure how native malloc works, but the checking malloc (which we
 use always) has an upper limit on the number of allocations allowed. if
 you want to use more memory you will have to recompile.


Just a thought, but is the amount of system-call casuing some problems.
Not knowing how much there are, but malloc is one of them.

If so, maybe some memory handling needs to be added which does once
allocates a huge block from the system and then in user land claims
pieces where needed. At the end of some cycle all is returned at
once, instead of all those small bits.

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





changes to the heartbeat code.

2002-05-29 Thread Harrie Hazewinkel

Hi,

I have attached a patch to group the heartbeat code.
If I hear/see no objections I will commit this.

It changes:
1) adds a stop all heartbeat functionality by by
  means of the heartbeat_thread value of '-1'
  (ALL_HEARTBEATS) as the heartbeat_stop function.
2) move the heartbeat frequentie default value in the
  heartbeat.h (IMHO, where it belongs)
3) changes the wapbox.c and smsbox.c where the
  returned thread_nr is only used for providing a warning
  and the heartbeatthread_stop does a stop ALL_HEARTBEATS.


regards,

Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
 


heartbeat.patch
Description: Binary data


CVS usage question??

2002-05-29 Thread Harrie Hazewinkel

HI all,

I wanted to commit changes in the gw directory. Although, only
5 of the many files were changed. But in the 'cvs commit' it
showed almost all files to be chnaged.

Has anyone seen it before??


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





RE:first draft and patch for module oriented API

2002-05-29 Thread Harrie Hazewinkel



--On Wednesday, May 29, 2002 12:18 PM +1000 Ignat Vassilev 
[EMAIL PROTECTED] wrote:

 Hi Harrie

 I tried to compile kannel with modules.patch but i recive error

Hmm, I will try top built a patch again. I tested it here a few times
and compilation was OK. Except for the test tools. I did not bother
to mamke changes there.

1) Did you do a 'rm .depend ; gmake .depend'??
Otherwise, the new files (resulting in an object-file)
do not end up in the libraries.

2) It also could be that the required patch lines (that includes
the file bearerbox_modules.h) in the bearer_box.c did not went correctly.

3) It was a patch for the 'HEAD of CVS'.



Hang on, I will see what really goes wrong.
Since I did a change in CVS, the patch will change as well.
New one will be provided soon.



 gcc -D_REENTRANT=1 -I. -g -O2 -DBROKEN_PTHREADS=1
 -I/usr/include/libxml2/libxml -I/usr/include/libxml2 -I/include -Wall
 -I/usr/include/openssl -I/usr/include/mysql  -o gw/bearerbox
 gw/bearerbox.o libgw.a libwmlscript.a libwap.a libgwlib.a -lmysqlclient
 -lssl -ldl -lpam -lpthread -lresolv -lnsl -lm  -L/usr/lib -lxml2 -lz
 -L/lib -lm -L/usr/lib -lcrypto -lssl -L/usr/lib/mysql -lmysqlclient
 libgwlib.a(modules.o): In function `is_allowed_by_module':
 /home/ozzy/kannel/gateway/gwlib/modules.c:54: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:56: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:57: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:67: undefined
 reference to `module_array_size' libgwlib.a(modules.o): In function
 `run_init':
 /home/ozzy/kannel/gateway/gwlib/modules.c:84: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:86: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:87: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:93: undefined
 reference to `module_array_size' libgwlib.a(modules.o): In function
 `run_start_thread':
 /home/ozzy/kannel/gateway/gwlib/modules.c:104: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:107: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:109: undefined reference to
 `module_array_size' /home/ozzy/kannel/gateway/gwlib/modules.c:110:
 undefined reference to `module_array'
 /home/ozzy/kannel/gateway/gwlib/modules.c:116: undefined reference to
 `module_array_size' libgwlib.a(modules.o): In function `run_stop_thread':
 /home/ozzy/kannel/gateway/gwlib/modules.c:126: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:129: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:131: undefined reference to
 `module_array_size' /home/ozzy/kannel/gateway/gwlib/modules.c:132:
 undefined reference to `module_array'
 /home/ozzy/kannel/gateway/gwlib/modules.c:134: undefined reference to
 `module_array_size' libgwlib.a(modules.o): In function `run_log':
 /home/ozzy/kannel/gateway/gwlib/modules.c:145: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:147: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:148: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:154: undefined
 reference to `module_array_size' libgwlib.a(modules.o): In function
 `run_exit':
 /home/ozzy/kannel/gateway/gwlib/modules.c:164: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:166: undefined
 reference to `module_array_size'
 /home/ozzy/kannel/gateway/gwlib/modules.c:167: undefined reference to
 `module_array' /home/ozzy/kannel/gateway/gwlib/modules.c:169: undefined
 reference to `module_array_size' collect2: ld returned 1 exit status
 make: *** [gw/bearerbox] Error 1

 Regards
 Ignat


Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





RE: Patch submission and release policy (Was: [PATCH] problems withHTTPS and base support for per message billing)

2002-05-29 Thread Harrie Hazewinkel



--On Wednesday, May 29, 2002 11:00 AM +0300 Oded Arbel [EMAIL PROTECTED] 
wrote:


 Well.. To be honest, using the CVS is an advantage because that way
 we get 100% testing and debug, code is done with less errors and bugs
 are fixed quicker ;)

 I'm always using cvs in production. Some bugs are only visible on
 production systems and I don't have time to do testings before
 upgrading. And if some message is lost, I can always blame the SMSC ;)


 There's some structural changes that we should do, and for that
 we really need a different branch. Modularity, new autoconf, real
 unicode support, etc.

 But for that, before thinking in branches and releases, we should
 think in the new architecture.



 I do not agree - we cannot even think of architecture changes while
 everyone is building their production systems from CVS.

I agree here.

 while here we
 also build our production from CVS by choice, for the same reasons you
 stated, this is a bad thing(tm). it's our obligation to supply a
 stable branch for people who rather have something that is known to
 work, then the bleeding edge (which is most people).

I would say (as mentioned in other emails) take the branch for a
stable release version. Those should not change that much as the
main branch were development is done.

 If we start doing
 architectural changes on the CVS, while everyone is using it to build
 their production, we will break things for people who don't/can't know
 how to handle it.

I simply do not understnad why people in the first place use a,
so-called, non stable CVS version in the production. It is well possible
that it si not even tested well enough.


 So a branch is a must before doing any major surgery on the code.

I agree. However, I believe that the main branch should be the main 
development
line, unless it would be something very experimental.



Harrie

Internet Management Consulting
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





first draft and patch for module oriented API.

2002-05-28 Thread Harrie Hazewinkel

HI All,

Attached is a document slightly explaining a module oriented API
and a patch assoicated for it.

I would people like to invite to make comments and in perticular those
who made additional modules that need always patching the core.
I understand it is not complete yet, but that is why I invite comments.

Harrie

Internet Management Consulting
tel: +39-3474932300
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/



modules.patch
Description: Binary data


module_struct.txt
Description: Binary data


question regarding the configuration implementation

2002-05-27 Thread Harrie Hazewinkel

HI all,

Maybe someone could help me out in order to confirm how
I think the configuration file is hanndled.
I believe this is the scheme:

A programm
1- opens the configuration file
2- reads it as a huge octet_string
3- splits is into a list of lines (octet_string)
4- parser the all lines of the list which could be
   a- a comment line (ignore)
   b- an include line (which inserts the to be included as a
   list of lines again steps 1,2,3)
   c- processes a lines (splits is at the '=', makes a name
  value pair and adds it in a dictionary)
(NOW ALL CONFFILE READING IS DONE)
5- initializes the needed process
   a- it starts for looking of groups in the dictionary
   b- depending on the group it looks for parameters.

I was wondering if someone could tell me the reason why putting it
in a dictionary first as a very general configuration representation
and later search into it for only those parts needed??

Another question I have is why one would have all configuration tokens
known to each process and depending on the process totally ignore it??
The main reason is maybe that this way a single configuration file
can be used for all, but I guess there is more.


I merely ask this on how to handle module specific configuration parts
for that module API I was talking of last week.

Any help is appreciated,


Harrie

Internet Management Consulting
tel: +39-3474932300
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





[PATCH] typo spesified

2002-05-15 Thread Harrie Hazewinkel

HI,

A typo some in the files, spesified = specified.

regards

Harrie

Internet Management Consulting
tel: +39-3474932300 / +31-625357135
mailto: [EMAIL PROTECTED]   http://www.lisanza.net/ 


specified.patch
Description: Binary data


idea of multi purpose logging

2002-05-10 Thread Harrie Hazewinkel

HI,

I was wondering what people would think of the idea of a multi
purpose logging. Currently (in version 1.1.6) one can only use
logfiles in a syslog style or log to stdout/stderr.
So what do I mean by multi purpose logging:

A wrapper of all kinds of logging possible from where
to a specific type of logging can be done. This would allow
in a more clean way more kinds of logging in such a way that
the core code still only has only call and from within
that call the multiple logging functions are done.
As a result the gwlib/log.c is the only file that needs to
be changed and there needs to be a log-function file for
each log function.

I hope I have made myself clear if not say so and
I will elaborate a bit more.

regards,

Harrie

Internet Management Consulting
tel: +39-3474932300 / +31-625357135
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





some other warnings of Kannel

2002-05-10 Thread Harrie Hazewinkel

HI,

(repost due to Non-members are not allowed to post messages
to this list (to avoid spam)

I have compiled the Kannel version 1.1.6 on FreeBSD 4.1-RELEASE i386
and got these warnings. Read the last one :-))

cc -funsigned-bitfields -D_REENTRANT=1 -I. -g -O2 
-I/usr/local/include/libxml2  -o checks/check_octstr checks/check_octstr.o 
libgw.a libwmlscript.a libwap.a libgwlib.a -lm  -lc_r -L/usr/local/lib 
-lxml2 -lz -lm
/usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider using 
mkstemp()
/usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider using 
mkstemp()
/usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider using 
mkstemp()
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is stupid.



Harrie

Internet Management Consulting
tel: +39-3474932300 / +31-625357135
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/





[PATCH] counter type change

2002-05-10 Thread Harrie Hazewinkel

Hi,

(repost due to using a non-subscribed address)

I have attached a patch for the kannel code which make the
internal type of the counter object an 'unsigned long'.
The advantage is that it wraps by itself and we have 1 bit
more in the value of the counter (32 bits). :-))

I noticed also that sometimes the value of the counter
returned by the accessor-functions used already 'unsigned
long'.

I have also added a 'counter_increase_with' value for
usage to increase counters by more then 1. This is when
one would count for instance the total bytes of the
messages sent.

Besdies I have a question; why is in most cases the
counter value retrieved and stored elsewhere.
One could directly get the value of the counter
by just keeping the reference to it in those
placed where now this value is 'copied'.


cheers,

Harrie

Internet Management Consulting
tel: +39-3474932300 / +31-625357135
mailto:[EMAIL PROTECTED]http ://www.mod-snmp.com/
 


counter.patch
Description: Binary data