Re: EMI: Serious Problem PANIC: Too many concurrent allocations

2002-05-24 Thread Kalle Marjola

On 24 May 2002, Abd Rahman Johari wrote:

 I'm trying to send out SMS Broadcast and after a while kannel just die
 because of PANIC: Too many concurrent allocations

You need to compile Kannel with non-checking malloc, i.e. use native 
malloc. ./configure --with-defaults=speed or --with-malloc=native should 
help.

Hm, this question needs to be a s a first one in FAQ, it is so often 
asked.. (in fact I could not find it from FAQ section at all..)

-- 
  kalle marjola





[PATCH] smsc_smpp.c UTC time in 1/2 hours

2002-05-24 Thread Alex Judd

Hopefully the last time I have to correct/patch this bit of code for a 
while..

Alex



-- 
Alex Judd
http://www.skywire.co.uk


Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.65
diff -u -r1.65 smsc_smpp.c
--- gw/smsc_smpp.c  22 May 2002 12:08:10 -  1.65
+++ gw/smsc_smpp.c  24 May 2002 15:59:00 -
 -326,20 +326,19 
 /* work out 1/4 hour difference between local time and UTC/GMT */
 gmtime = gw_gmtime(time(NULL));
 localtime = gw_localtime(time(NULL));
-if (localtime.tm_hour = gmtime.tm_hour) {
+gwqdiff = ((localtime.tm_hour - gmtime.tm_hour) * 4)
+  + ((localtime.tm_min - gmtime.tm_min) / 15);
+if (gwqdiff = 0)
 relation_UTC_time = octstr_create(+);
-gwqdiff = (localtime.tm_hour - gmtime.tm_hour) * 4;
-} else {
+else
 relation_UTC_time = octstr_create(-);
-gwqdiff = (gmtime.tm_hour - localtime.tm_hour) * 4;
-}
 
 if (msg-sms.validity) {
 tm = gw_localtime(time(NULL) + msg-sms.validity * 60);
 sprintf(buffer, %02d%02d%02d%02d%02d%02d0%01d%02d%1s,
 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
 tm.tm_hour, tm.tm_min, tm.tm_sec,
-0, gwqdiff, relation_UTC_time );
+0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
 pdu-u.submit_sm.validity_period = octstr_create(buffer);
 }
 
 -348,7 +347,7 
 sprintf(buffer, %02d%02d%02d%02d%02d%02d0%01d%02d%1s,
 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
 tm.tm_hour, tm.tm_min, tm.tm_sec,
-0, gwqdiff, relation_UTC_time );
+0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
 pdu-u.submit_sm.schedule_delivery_time = octstr_create(buffer);
 }
 }