Open cypherlou opened 6 months ago
I'm getting a rejection pushing my branch;
git push --set-upstream origin 4-use-correct-TON-and-NPI
remote: Permission to jookies/smpp.pdu.git denied to whorlou.
fatal: unable to access 'https://github.com/jookies/smpp.pdu.git/': The requested URL returned error: 403
My change is pretty simple;
git diff master 4-use-correct-TON-and-NPI
diff --git a/smpp/pdu/pdu_types.py b/smpp/pdu/pdu_types.py
index d2469c2..72a4b8b 100644
--- a/smpp/pdu/pdu_types.py
+++ b/smpp/pdu/pdu_types.py
@@ -55,8 +55,8 @@ class RegisteredDelivery(RegisteredDeliveryBase):
def __repr__(self):
return 'RegisteredDelivery[receipt: %s, smeOriginatedAcks: %s, intermediateNotification: %s]' % (self.receipt, self.smeOriginatedAcks, self.intermediateNotification)
-AddrTon = Enum('AddrTon', list(constants.addr_ton_name_map.keys()))
-AddrNpi = Enum('AddrNpi', list(constants.addr_npi_name_map.keys()))
+AddrTon = Enum('AddrTon', {key: value for key, value in constants.addr_ton_name_map.items()})
+AddrNpi = Enum('AddrNpi', {key: value for key, value in constants.addr_npi_name_map.items()})
PriorityFlag = Enum('PriorityFlag', list(constants.priority_flag_name_map.keys()))
ReplaceIfPresentFlag = Enum('ReplaceIfPresentFlag', list(constants.replace_if_present_flap_name_map.keys()))
Background
I've been compelled to add an
mtinterceptor
to Jasmin to support a sensitive SMPP gateway. The requirement is broadly to define a TON and NPI as follows;In the last example I have;
The problem
As things stand the TON values defined in
smpp/pdu/constants.py
(using the NPI as the example), as seen from the Jasmin Interceptor -list(AddrNPI)
are;This obviously doesn't match the corresponding values defined in
smpp/pdu/constants.py
;The values (as seen form the Jasmin Interceptor) as defined as the order of the entry in the
dict
and not the actual value.