Re: UCP/EMI to support E50_HPLMN and E50_AC
Hi, thanks for your contribution but this is not acceptable patch, see below... + +//Insert the E50_HPLMN into meta_data we are in C and this is not C comment style ;) +msg-sms.meta_data = octstr_duplicate(emimsg-fields[E50_HPLMN]); potential mem leak, best to destroy meta_data first + if (msg-sms.meta_data != NULL) { +meta_data_set_value(msg-sms.meta_data, smpp , octstr_imm(E50_HPLMN), octstr_duplicate(emimsg-fields[E50_HPLMN]),1); + } why do you use smpp meta data group in UCP ? Please change to use ?emi? or ?ucp? group. Alex Am 10.07.2014 um 19:59 schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. thanks emi.patch
Re: UCP/EMI to support E50_HPLMN and E50_AC
Hi Alex, Thanks, I know about the comment :) I just did that quickly and yesterday I updated it on the redmine and provided the dpatch. I've added the destroy and also changed the group to ucp. here's the dpatch. Thanks again! MAG On Wed, 2014-07-16 at 09:40 +0200, Alexander Malysh wrote: Hi, thanks for your contribution but this is not acceptable patch, see below... + +//Insert the E50_HPLMN into meta_data we are in C and this is not C comment style ;) +msg-sms.meta_data = octstr_duplicate(emimsg-fields[E50_HPLMN]); potential mem leak, best to destroy meta_data first + if (msg-sms.meta_data != NULL) { +meta_data_set_value(msg-sms.meta_data, smpp , octstr_imm(E50_HPLMN), octstr_duplicate(emimsg-fields[E50_HPLMN]),1); + } why do you use smpp meta data group in UCP ? Please change to use ?emi? or ?ucp? group. Alex Am 10.07.2014 um 19:59 schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. thanks emi.patch emi.dpatch Description: application/shellscript
[PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. Hi Mark, thanks a lot for the patch, we appreciate your willingness to contribute. In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. Stipe -- --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/http://www.tolj.org/ mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org --- Index: gw/bb_smscconn.c === --- gw/bb_smscconn.c(revision 5002) +++ gw/bb_smscconn.c(working copy) @@ -92,7 +92,7 @@ #include bb_smscconn_cb.h/* callback functions for connections */ #include smscconn_p.h/* to access counters */ -#include smsc/smpp_pdu.h /* access smpp_pdu_init/smpp_pdu_shutdown */ +#include generic_tlv.h /* access generic_tlv_[init|shutdown] */ /* passed from bearerbox core */ @@ -728,9 +728,8 @@ if (handle_concatenated_mo) init_concat_handler(); -/* initialize low level PDUs */ -if (smpp_pdu_init(cfg) == -1) -panic(0, Connot start with PDU init failed.); +/* initialize generic TLVs */ +generic_tlv_init(); smsc_groups = cfg_get_multi_group(cfg, octstr_imm(smsc)); gwlist_add_producer(smsc_list); @@ -1076,8 +1075,8 @@ */ gwlist_remove_producer(incoming_sms); -/* shutdown low levele PDU things */ -smpp_pdu_shutdown(); +/* shutdown generic TLVs */ +generic_tlv_shutdown(); return 0; } Index: gw/generic_tlv.c === --- gw/generic_tlv.c(revision 0) +++ gw/generic_tlv.c(working copy) @@ -0,0 +1,301 @@ +/* + * The Kannel Software License, Version 1.0 + * + * Copyright (c) 2001-2012 Kannel Group + * Copyright (c) 1998-2001 WapIT Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. + * + * 3. The end-user documentation included with the redistribution, + *if any, must include the following acknowledgment: + * This product includes software developed by the + *Kannel Group (http://www.kannel.org/). + *Alternately, this acknowledgment may appear in the software itself, + *if and wherever such third-party acknowledgments normally appear. + * + * 4. The names Kannel and Kannel Group must not be used to + *endorse or promote products derived from this software without + *prior written permission. For written permission, please + *contact o...@kannel.org. + * + * 5. Products derived from this software may not be called Kannel, + *nor may Kannel appear in their name, without prior written + *permission of the Kannel Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Am 16.07.2014 16:54, schrieb Marc-Andre Gatien: Hi Stipe, That's exactly what I was looking for :) I know it was ugly the way I did it... I was short on time to get this connection working. How do I vote to get your patch applied on the trunk repo? Hi Marc-Andre, first of all, it would be good if you can apply the patchset for your specific case with adding the EMI/UCP pieces. Then simply confirm that you're fine with running/testing it, and post a vote on the devel@ mailing list, in the same mail thread. The voting system is described as: vote : meaning -1 : veto, I'm absolutely against the patch -0 : not really in favor, but won't veto +0 : not a must, but why not adding it +1 : definitely worth adding -1 vetos are real vetos only for core development members that have SVN write permission. All normal users CAN use this vote, but it's not formally causing a veto stop. Stipe -- --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/http://www.tolj.org/ mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org ---
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Hi Stipe, That's exactly what I was looking for :) I know it was ugly the way I did it... I was short on time to get this connection working. How do I vote to get your patch applied on the trunk repo? thanks, MAG On Wed, 2014-07-16 at 16:40 +0200, Stipe Tolj wrote: Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. Hi Mark, thanks a lot for the patch, we appreciate your willingness to contribute. In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. Stipe
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Perfect sounds great. Thanks again! MAG On Wed, 2014-07-16 at 16:58 +0200, Stipe Tolj wrote: Am 16.07.2014 16:54, schrieb Marc-Andre Gatien: Hi Stipe, That's exactly what I was looking for :) I know it was ugly the way I did it... I was short on time to get this connection working. How do I vote to get your patch applied on the trunk repo? Hi Marc-Andre, first of all, it would be good if you can apply the patchset for your specific case with adding the EMI/UCP pieces. Then simply confirm that you're fine with running/testing it, and post a vote on the devel@ mailing list, in the same mail thread. The voting system is described as: vote : meaning -1 : veto, I'm absolutely against the patch -0 : not really in favor, but won't veto +0 : not a must, but why not adding it +1 : definitely worth adding -1 vetos are real vetos only for core development members that have SVN write permission. All normal users CAN use this vote, but it's not formally causing a veto stop. Stipe
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Hi, idea is good but TLV is SMPP specific IMHO. Therefore I would not expect this as generic :-) Patch is hardcoded on many places. If you do it generic then please do it instead of just to name it so. I would expect generic config groups that have proto inside of group and SMPP PDU just fetch with constant they part instead of oct_imm(smpp-tlv). so the group would be: group = tlv (Hier we have to think about better name, TLV is confusing) protocol = smpp/ucp/cimd2 name = xxx tag = xxx length = xxx type = INTEGER/OCTSTR/NULTERMINATED smsc-id = xxx;xxx1 Then SMPP PDU will just fetch by proto: generic_tlv_get_by_tag(TLV_PROTO_SMPP, smsc_id, tag); And please avoid using typedefs it's really bad style: http://discuss.fogcreek.com/joelonsoftware1/default.asp?cmd=showixPost=10506 Alex Am 16.07.2014 um 16:40 schrieb Stipe Tolj st...@kannel.org: Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. Hi Mark, thanks a lot for the patch, we appreciate your willingness to contribute. In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. Stipe -- --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/http://www.tolj.org/ mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org --- gateway-generic-tlv.diff
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
While we think about changing tlv, we should also think about having a set of tlv which you can apply to a smsc. In my case I have like 40 instances of the same SMSC and having 20 TLV configs for every smsc (as you specify smsc-id in it) is creating very long config files. What about group = tlv name = xxx tag = xxx length = xxx type = INTEGER/OCTSTR/NULLTERMINATED vendor-id = XXX and then under SMSC group = smpp vendor-tlv = xxx... this would automatically link a certain set of tlv's to a specific smpp. not sure if protocol is really needed in the tlv in that case. On 16 Jul 2014, at 17:35, Alexander Malysh amal...@kannel.org wrote: Hi, idea is good but TLV is SMPP specific IMHO. Therefore I would not expect this as generic :-) Patch is hardcoded on many places. If you do it generic then please do it instead of just to name it so. I would expect generic config groups that have proto inside of group and SMPP PDU just fetch with constant they part instead of oct_imm(smpp-tlv). so the group would be: group = tlv (Hier we have to think about better name, TLV is confusing) protocol = smpp/ucp/cimd2 name = xxx tag = xxx length = xxx type = INTEGER/OCTSTR/NULTERMINATED smsc-id = xxx;xxx1 Then SMPP PDU will just fetch by proto: generic_tlv_get_by_tag(TLV_PROTO_SMPP, smsc_id, tag); And please avoid using typedefs it's really bad style: http://discuss.fogcreek.com/joelonsoftware1/default.asp?cmd=showixPost=10506 Alex Am 16.07.2014 um 16:40 schrieb Stipe Tolj st...@kannel.org: Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. Hi Mark, thanks a lot for the patch, we appreciate your willingness to contribute. In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. Stipe -- --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/http://www.tolj.org/ mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org --- gateway-generic-tlv.diff signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Technically, you can obtain the protocol from the smsc-id. I don't think we need to specify it in the group = tlv. cheers, MAG On Wed, 2014-07-16 at 17:35 +0200, Alexander Malysh wrote: Hi, idea is good but TLV is SMPP specific IMHO. Therefore I would not expect this as generic :-) Patch is hardcoded on many places. If you do it generic then please do it instead of just to name it so. I would expect generic config groups that have proto inside of group and SMPP PDU just fetch with constant they part instead of oct_imm(smpp-tlv). so the group would be: group = tlv (Hier we have to think about better name, TLV is confusing) protocol = smpp/ucp/cimd2 name = xxx tag = xxx length = xxx type = INTEGER/OCTSTR/NULTERMINATED smsc-id = xxx;xxx1 Then SMPP PDU will just fetch by proto: generic_tlv_get_by_tag(TLV_PROTO_SMPP, smsc_id, tag); And please avoid using typedefs it's really bad style: http://discuss.fogcreek.com/joelonsoftware1/default.asp?cmd=showixPost=10506 Alex Am 16.07.2014 um 16:40 schrieb Stipe Tolj st...@kannel.org: Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com: Hi, I'm using the meta-data to get the E50_HPLMN and set the E50_AC. here's the patch to support that for the EMI protocol. If you guys have a better way of doing so please feel free to give me a hint. I'd like to apply the patch in the main repo asap. Hi Mark, thanks a lot for the patch, we appreciate your willingness to contribute. In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. Stipe -- --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/http://www.tolj.org/ mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org --- gateway-generic-tlv.diff