Re: Message ID higher than 2147483647
Heh, resentful attitude. ;) M On 6/1/06, Rene Kluwen [EMAIL PROTECTED] wrote: Stipe, Are you maintaining a ChangeLog of the ChangeLog? ;) -- ME -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stipe Tolj Sent: vrijdag 2 juni 2006 1:15 To: Mi Reflejo Cc: users@kannel.org Subject: Re: Message ID higher than 2147483647 Mi Reflejo wrote: Well. Actually the patch was mine ;) wups... need to correct the credits in ChangeLog then.. :) 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: Message ID higher than 2147483647
Rene Kluwen wrote: Stipe, Are you maintaining a ChangeLog of the ChangeLog? ;) nop :], should I? ;) 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: Message ID higher than 2147483647
Mi Reflejo wrote: Heh, resentful attitude. ;) structural, yes... but unreal ;) 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: Message ID higher than 2147483647
Ady Wicaksono wrote: Dear all on 32 bit system, we have max int 2^31 - 1 = 2147483647 (look at /usr/include/stdint.h) :# define INT32_MAX(2147483647) I have the problem with this, some of SMSC use hex/decimal pair. submit_sm_resp is using hexadecimal 2006-05-18 15:30:18 [16274] [6] DEBUG: type_name: submit_sm_resp 2006-05-18 15:30:18 [16274] [6] DEBUG: command_id: 2147483652 = 0x8004 2006-05-18 15:30:18 [16274] [6] DEBUG: command_status: 0 = 0x 2006-05-18 15:30:18 [16274] [6] DEBUG: sequence_number: 13 = 0x000d 2006-05-18 15:30:18 [16274] [6] DEBUG: message_id: B88B2856 Message ID is 3096127574 in decimal which is bigger than max-int so 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, ts=2147483647, src=xxx, dst=x, mask=31, boxc= Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as delivery report like this, they inform id 3096127574 state but our kannel can't find DLR entries 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 69 64 3a 33 30 39 36 31 32 37 35 37 34 20 73 75 id:3096127574 su 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 62 3a 30 30 30 20 64 6c 76 72 64 3a 30 30 30 20 b:000 dlvrd:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 73 75 62 6d 69 74 20 64 61 74 65 3a 30 36 30 35 submit date:0605 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 31 38 31 35 33 32 20 64 6f 6e 65 20 64 61 74 65 181532 done date 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 30 36 30 35 31 38 31 35 33 32 20 73 74 61 74 :0605181532 stat 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 44 45 4c 49 56 52 44 20 65 72 72 3a 30 30 30 :DELIVRD err:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 20 74 65 78 74 3a 54 65 72 69 6d 61 20 4b 61 73text: 2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR 2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR smsc=smpp, ts=2147483647, dst=, type=1 2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found 2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for DSTxxx not found. 2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not find message or was not interested in it id 2147483647 dstx, type1 Any issue on this limit? ok, this is a major one please do as Vincent suggest, provide the same data as you desribed here to the bug tracking system at http://bugs.kannel.org/ I'm investigating if this is really the case in the code and propose a fix. Thanks for the report. 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: Message ID higher than 2147483647
Vincent CHAVANIS wrote: joke buy a 64bit server :-) /joke now, joking is only allowed if afterwards code analysis follows! :p 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: Message ID higher than 2147483647
There is a patch :) http://bugs.kannel.org/view_bug_advanced_page.php?f_id=345 Regards, M On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote: Vincent CHAVANIS wrote: joke buy a 64bit server :-) /joke now, joking is only allowed if afterwards code analysis follows! :p 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: Message ID higher than 2147483647
Ady Wicaksono wrote: Dear all on 32 bit system, we have max int 2^31 - 1 = 2147483647 (look at /usr/include/stdint.h) :# define INT32_MAX(2147483647) I have the problem with this, some of SMSC use hex/decimal pair. submit_sm_resp is using hexadecimal 2006-05-18 15:30:18 [16274] [6] DEBUG: type_name: submit_sm_resp 2006-05-18 15:30:18 [16274] [6] DEBUG: command_id: 2147483652 = 0x8004 2006-05-18 15:30:18 [16274] [6] DEBUG: command_status: 0 = 0x 2006-05-18 15:30:18 [16274] [6] DEBUG: sequence_number: 13 = 0x000d 2006-05-18 15:30:18 [16274] [6] DEBUG: message_id: B88B2856 Message ID is 3096127574 in decimal which is bigger than max-int so 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, ts=2147483647, src=xxx, dst=x, mask=31, boxc= Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as delivery report like this, they inform id 3096127574 state but our kannel can't find DLR entries 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 69 64 3a 33 30 39 36 31 32 37 35 37 34 20 73 75 id:3096127574 su 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 62 3a 30 30 30 20 64 6c 76 72 64 3a 30 30 30 20 b:000 dlvrd:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 73 75 62 6d 69 74 20 64 61 74 65 3a 30 36 30 35 submit date:0605 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 31 38 31 35 33 32 20 64 6f 6e 65 20 64 61 74 65 181532 done date 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 30 36 30 35 31 38 31 35 33 32 20 73 74 61 74 :0605181532 stat 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 44 45 4c 49 56 52 44 20 65 72 72 3a 30 30 30 :DELIVRD err:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 20 74 65 78 74 3a 54 65 72 69 6d 61 20 4b 61 73text: 2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR 2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR smsc=smpp, ts=2147483647, dst=, type=1 2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found 2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for DSTxxx not found. 2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not find message or was not interested in it id 2147483647 dstx, type1 Any issue on this limit? provided patch from Ady has been commited to cvs. Resolving bug #345. Please confirm. 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: Message ID higher than 2147483647
Well. Actually the patch was mine ;) M. On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote: Ady Wicaksono wrote: Dear all on 32 bit system, we have max int 2^31 - 1 = 2147483647 (look at /usr/include/stdint.h) :# define INT32_MAX(2147483647) I have the problem with this, some of SMSC use hex/decimal pair. submit_sm_resp is using hexadecimal 2006-05-18 15:30:18 [16274] [6] DEBUG: type_name: submit_sm_resp 2006-05-18 15:30:18 [16274] [6] DEBUG: command_id: 2147483652 = 0x8004 2006-05-18 15:30:18 [16274] [6] DEBUG: command_status: 0 = 0x 2006-05-18 15:30:18 [16274] [6] DEBUG: sequence_number: 13 = 0x000d 2006-05-18 15:30:18 [16274] [6] DEBUG: message_id: B88B2856 Message ID is 3096127574 in decimal which is bigger than max-int so 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, ts=2147483647, src=xxx, dst=x, mask=31, boxc= Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as delivery report like this, they inform id 3096127574 state but our kannel can't find DLR entries 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 69 64 3a 33 30 39 36 31 32 37 35 37 34 20 73 75 id:3096127574 su 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 62 3a 30 30 30 20 64 6c 76 72 64 3a 30 30 30 20 b:000 dlvrd:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 73 75 62 6d 69 74 20 64 61 74 65 3a 30 36 30 35 submit date:0605 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 31 38 31 35 33 32 20 64 6f 6e 65 20 64 61 74 65 181532 done date 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 30 36 30 35 31 38 31 35 33 32 20 73 74 61 74 :0605181532 stat 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 44 45 4c 49 56 52 44 20 65 72 72 3a 30 30 30 :DELIVRD err:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 20 74 65 78 74 3a 54 65 72 69 6d 61 20 4b 61 73text: 2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR 2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR smsc=smpp, ts=2147483647, dst=, type=1 2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found 2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for DSTxxx not found. 2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not find message or was not interested in it id 2147483647 dstx, type1 Any issue on this limit? provided patch from Ady has been commited to cvs. Resolving bug #345. Please confirm. 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: Message ID higher than 2147483647
But all merits to Ady for show us the light ;) On 6/1/06, Mi Reflejo [EMAIL PROTECTED] wrote: Well. Actually the patch was mine ;) M. On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote: Ady Wicaksono wrote: Dear all on 32 bit system, we have max int 2^31 - 1 = 2147483647 (look at /usr/include/stdint.h) :# define INT32_MAX(2147483647) I have the problem with this, some of SMSC use hex/decimal pair. submit_sm_resp is using hexadecimal 2006-05-18 15:30:18 [16274] [6] DEBUG: type_name: submit_sm_resp 2006-05-18 15:30:18 [16274] [6] DEBUG: command_id: 2147483652 = 0x8004 2006-05-18 15:30:18 [16274] [6] DEBUG: command_status: 0 = 0x 2006-05-18 15:30:18 [16274] [6] DEBUG: sequence_number: 13 = 0x000d 2006-05-18 15:30:18 [16274] [6] DEBUG: message_id: B88B2856 Message ID is 3096127574 in decimal which is bigger than max-int so 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, ts=2147483647, src=xxx, dst=x, mask=31, boxc= Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as delivery report like this, they inform id 3096127574 state but our kannel can't find DLR entries 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 69 64 3a 33 30 39 36 31 32 37 35 37 34 20 73 75 id:3096127574 su 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 62 3a 30 30 30 20 64 6c 76 72 64 3a 30 30 30 20 b:000 dlvrd:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 73 75 62 6d 69 74 20 64 61 74 65 3a 30 36 30 35 submit date:0605 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 31 38 31 35 33 32 20 64 6f 6e 65 20 64 61 74 65 181532 done date 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 30 36 30 35 31 38 31 35 33 32 20 73 74 61 74 :0605181532 stat 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 3a 44 45 4c 49 56 52 44 20 65 72 72 3a 30 30 30 :DELIVRD err:000 2006-05-18 15:30:36 [16274] [9] DEBUG: data: 20 74 65 78 74 3a 54 65 72 69 6d 61 20 4b 61 73text: 2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR 2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR smsc=smpp, ts=2147483647, dst=, type=1 2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found 2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for DSTxxx not found. 2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not find message or was not interested in it id 2147483647 dstx, type1 Any issue on this limit? provided patch from Ady has been commited to cvs. Resolving bug #345. Please confirm. 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: Message ID higher than 2147483647
Mi Reflejo wrote: Well. Actually the patch was mine ;) wups... need to correct the credits in ChangeLog then.. :) 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: Message ID higher than 2147483647
Stipe, Are you maintaining a ChangeLog of the ChangeLog? ;) -- ME -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stipe Tolj Sent: vrijdag 2 juni 2006 1:15 To: Mi Reflejo Cc: users@kannel.org Subject: Re: Message ID higher than 2147483647 Mi Reflejo wrote: Well. Actually the patch was mine ;) wups... need to correct the credits in ChangeLog then.. :) 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 ---
(Solutions) Re: Message ID higher than 2147483647
Hahahaha That's not a solutions :D, I found a very simple solutions for this just now: cut here #include stdio.h int main(){ printf(B88B2856 = %lu\n,strtol(B88B2856,NULL,16)); printf(B88B2856 = %ld\n,strtoll(B88B2856,NULL,16)); printf(B88B2856 = %lu\n,strtoll(B88B2856,NULL,16)); } cut here B88B2856 is just an example of hexa number which is = 3096127574 in decimal look at the result: $ ./a.out B88B2856 = 2147483647 B88B2856 = -1198839722 B88B2856 = 3096127574 The correct value is if we use printf(B88B2856 = %lu\n,strtoll(B88B2856,NULL,16)); I use kannel 1.4.0, and found this problem at file gw/smsc/smsc_smpp.c 1. in function static Msg *handle_dlr(SMPP *smpp, Octstr *destination_addr, Octstr *short_message, Octstr *message_payload, Octstr *receipted_message_id, long message_state) cut here - if (smpp-smpp_msg_id_type == -1) { /* the default, C string */ tmp = octstr_duplicate(msgid); } else { if (smpp-smpp_msg_id_type 0x02) { tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 16)); } else { tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 10)); } } cut here - to fix it, change line tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 16)); to tmp = octstr_format(%lu, strtoll(octstr_get_cstr(msgid), NULL, 16)); also tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 10)); to tmp = octstr_format(%lu, strtoll(octstr_get_cstr(msgid), NULL, 10)); 2. in function static void handle_pdu(SMPP *smpp, Connection *conn, SMPP_PDU *pdu, long *pending_submits) on case submit_sm_resp: cut here - Octstr *tmp; /* check if msg_id is C string, decimal or hex for this SMSC */ if (smpp-smpp_msg_id_type == -1) { /* the default, C string */ tmp = octstr_duplicate(pdu-u.submit_sm_resp.message_id); } else { if (smpp-smpp_msg_id_type 0x01) { tmp = octstr_format(%ld, strtol( /* hex */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16)); } else { tmp = octstr_format(%ld, strtol( /* decimal */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10)); } } /* SMSC ACK.. now we have the message id. */ if (DLR_IS_ENABLED_DEVICE(msg-sms.dlr_mask)) dlr_add(smpp-conn-id, tmp, msg); cut here - change line : tmp = octstr_format(%ld, strtol( /* hex */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16)); to tmp = octstr_format(%lu, strtoll( /* hex */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16)); also: tmp = octstr_format(%ld, strtol( /* decimal */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10)); to tmp = octstr_format(%lu, strtoll( /* decimal */ octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10)); and recompile your kannel Good luck Vincent CHAVANIS wrote: joke buy a 64bit server :-) /joke btw, please fill a bug report on mantis : http://bugs.kannel.org/main_page.php regards Vincent -- Telemaque - NICE - (FR) Service Technique - Developpement http://www.telemaque.fr/ [EMAIL PROTECTED] Tel : +33 4 93 97 71 64 (fax 68) - Original Message - From: Ady Wicaksono [EMAIL PROTECTED] To: users@kannel.org Sent: Thursday, May 18, 2006 11:42 AM Subject: Message ID higher than 2147483647 Dear all on 32 bit system, we have max int 2^31 - 1 = 2147483647 (look at /usr/include/stdint.h) :# define INT32_MAX(2147483647) I have the problem with this, some of SMSC use hex/decimal pair. submit_sm_resp is using hexadecimal 2006-05-18 15:30:18 [16274] [6] DEBUG: type_name: submit_sm_resp 2006-05-18 15:30:18 [16274] [6] DEBUG: command_id: 2147483652 = 0x8004 2006-05-18 15:30:18 [16274] [6] DEBUG: command_status: 0 = 0x 2006-05-18 15:30:18 [16274] [6] DEBUG: sequence_number: 13 = 0x000d 2006-05-18 15:30:18 [16274] [6] DEBUG: message_id: B88B2856 Message ID is 3096127574 in decimal which is bigger than max-int so 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends. 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, ts=2147483647, src=xxx, dst=x, mask=31, boxc= Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as delivery report like this, they inform id 3096127574 state but our kannel can't find DLR entries 2006-05-18 15:30:36