Skip to content

Commit

Permalink
Revert "Adjust logging. Log message DLR, SRC_ADDR and DST_ADDR accord…
Browse files Browse the repository at this point in the history
…ing to last part of the message."

This reverts commit ff9424a.
  • Loading branch information
Kisuke-CZE committed Oct 24, 2023
1 parent ff9424a commit 7fff3f2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions jasmin/managers/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,10 @@ def submit_sm_resp_event(self, r, amqpMessage):
splitMethod = 'sar'
elif UDHI_INDICATOR_SET and r.request.params['short_message'][:3] == b'\x05\x00\x03':
splitMethod = 'udh'

# create _pdu before splitting, so we can use it in both branches (logging the message according the last part of message)
_pdu = r.request

# Concatenate short_message
if splitMethod is not None:
_pdu = r.request
if splitMethod == 'sar':
short_message = _pdu.params['short_message']
else:
Expand Down Expand Up @@ -330,12 +328,12 @@ def submit_sm_resp_event(self, r, amqpMessage):
r.response.params['message_id'],
r.response.status,
amqpMessage.content.properties['priority'],
_pdu.params['registered_delivery'].receipt,
r.request.params['registered_delivery'].receipt,
'none' if ('headers' not in amqpMessage.content.properties or
'expiration' not in amqpMessage.content.properties['headers'])
else amqpMessage.content.properties['headers']['expiration'],
_pdu.params['source_addr'],
_pdu.params['destination_addr'],
r.request.params['source_addr'],
r.request.params['destination_addr'],
logged_content)
else:
# Message must be retried ?
Expand Down

0 comments on commit 7fff3f2

Please sign in to comment.