On Fri, 2012-02-10 at 15:24, kova...@apollo.lv wrote: > Hello, > > I’m trying to change File /gw/smsc/smsc_smpp.c > > Maybe anyone have stept in to such problem, and has an advice where to > change the file will be better? > > I need to receive Deliver SM with 0 fields, so I’m wondering if I catch > Delivers With Null source address and change the data of those fields. > Most of time after compilation I get segmentation fault.. > > 1602: dlrmsg = handle_dlr(smpp, pdu->u.deliver_sm.source_addr, > pdu->u.deliver_sm.short_message, pdu->u.deliver_sm.message_payload, > > pdu->u.deliver_sm.receipted_message_id, pdu->u.deliver_sm.message_state, > pdu->u.deliver_sm.network_error_code); > > Here I can catch if I have an empty source address like that: > > if ( pdu->u.deliver_sm.source_addr == NULL) {} > > Any help would be appreciated
Could you send a patch with your changes and tell which version of Kannel you use as a base for your modifications? And, questions about code modification/change should be posted to the de...@kannel.org, IMHO. > Regards. Vit > > On Tue, 07 Feb 2012 15:46:04 +0200 > <kova...@apollo.lv>wrote: > > > > Hi, > > I’ve stept into a problem, Is it possible to handle > >Deliver_SM with empty fields except TLV fields?how? > > I get an Error, that its Null, here is my LOG: > > > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter tag (0x1506) > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter length read as 5 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Found configured > >optional parameter `rut_message_id' > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter tag (0x1508) > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter length read as 1 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Found configured > >optional parameter `rut _report_type' > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter tag (0x1500) > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Optional > >parameter length read as 14 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: Found configured > >optional parameter `rut_created_ts' > > 2012-02-07 15:04:40 [12259] [6] DEBUG: SMPP[xxxx]: Got > >PDU: > > 2012-02-07 15:04:40 [12259] [6] DEBUG: SMPP PDU 0x850eb1 > > 0 dump: > > 2012-02-07 15:04:40 [12259] [6] DEBUG: type_name: > >deliver_sm > > 2012-02-07 15:04:40 [12259] [6] DEBUG: command_id: 5 = > >0x00000005 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: command_status: > >0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > sequence_number: 1 = 0x00000001 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: service_type: > >NULL > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > source_addr_ton: 0 = 0x00000000 > > 2012-02-07 15:0 4:40 [12259] [6] DEBUG: > > source_addr_npi: 0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: source_addr: > >NULL > > 2012-02-07 15:04:40 [12259] [6] DEBUG: dest_addr_ton: > >0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: dest_addr_npi: > >0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > destination_addr: NULL > > 2012-02-07 15:04:40 [12259] [6] DEBUG: esm_class: 4 = > >0x00000004 > > 2012-02- 07 15:04:40 [12259] [6] DEBUG: protocol_id: > >0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: priority_flag: > >0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > schedule_delivery_time: NULL > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > validity_period: NULL > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > registered_delivery: 0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > replace_if_present_flag: 0 = 0 x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: data_coding: 0 > >= 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: > > sm_default_msg_id: 0 = 0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: sm_length: 0 = > >0x00000000 > > 2012-02-07 15:04:40 [12259] [6] DEBUG: short_message: > >"" > > 2012-02-07 15:04:40 [12259] [6] DEBUG: rut_message_id: > >"48024" > > 2012-02-07 15:04:40 [12259] [6] DEBUG: rut_created_ts: > >"20120207150639" > > 2 012-02-07 15:04:40 [12259] [6] DEBUG: > > rut_report_type: "0" > > 2012-02-07 15:04:40 [12259] [6] DEBUG: SMPP PDU dump > >ends. > > 2012-02-07 15:04:40 [12259] [6] DEBUG: SMPP[xxxx] > >handle_pdu, got DLR > > 2012-02-07 15:04:40 [12259] [6] ERROR: SMPP[xxx]: got > >DLR but could not find message or was not interested in > >it id<> dst<(null)>, type<-1> > > > > > > Regards. > WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-CLI2Mn/pkcs11: No > such file or directory -- Kind regards, Milan -------------------------------------------------- Arvanta, IT Security http://www.arvanta.net Please do not send me e-mail containing HTML code or documents in proprietary format (word, excel, pps and so on)