SMPP: drop cmd_id wrapper
We can use osmo_load32be() directly. Related: OS#5568 Change-Id: I875eb5249004d3a960aee46c5099592d18fcaa76
This commit is contained in:
parent
af549a91b3
commit
a1fa84f10a
|
@ -50,7 +50,6 @@ struct esme {
|
|||
(resp)->sequence_number = (req)->sequence_number; }
|
||||
|
||||
struct esme *esme_alloc(void *ctx);
|
||||
uint32_t smpp_msgb_cmdid(struct msgb *msg);
|
||||
uint32_t esme_inc_seq_nr(struct esme *esme);
|
||||
int pack_and_send(struct esme *esme, uint32_t type, void *ptr);
|
||||
int smpp_msc_alloc_init(void *ctx);
|
||||
|
|
|
@ -712,7 +712,7 @@ static int smpp_handle_submit(struct smpp_esme *esme, struct msgb *msg)
|
|||
/*! \brief one complete SMPP PDU from the ESME has been received */
|
||||
static int smpp_pdu_rx(struct smpp_esme *esme, struct msgb *msg __uses)
|
||||
{
|
||||
uint32_t cmd_id = smpp_msgb_cmdid(msg);
|
||||
uint32_t cmd_id = osmo_load32be(msgb_data(msg) + 4);
|
||||
int rc = 0;
|
||||
|
||||
LOGPESME(esme->esme, LOGL_DEBUG, "smpp_pdu_rx(%s)\n", msgb_hexdump(msg));
|
||||
|
|
|
@ -25,13 +25,6 @@
|
|||
#include <osmocom/netif/stream.h>
|
||||
#include <osmocom/smpp/smpp_smsc.h>
|
||||
|
||||
/*! \brief retrieve SMPP command ID from a msgb */
|
||||
uint32_t smpp_msgb_cmdid(struct msgb *msg)
|
||||
{
|
||||
uint8_t *tmp = msgb_data(msg) + 4;
|
||||
return ntohl(*(uint32_t *)tmp);
|
||||
}
|
||||
|
||||
int smpp_determine_scheme(uint8_t dcs, uint8_t *data_coding, int *mode)
|
||||
{
|
||||
if ((dcs & 0xF0) == 0xF0) {
|
||||
|
|
|
@ -127,7 +127,7 @@ static int bind_transceiver(struct esme *esme)
|
|||
|
||||
static int smpp_pdu_rx(struct esme *esme, struct msgb *msg)
|
||||
{
|
||||
uint32_t cmd_id = smpp_msgb_cmdid(msg);
|
||||
uint32_t cmd_id = osmo_load32be(msgb_data(msg) + 4);
|
||||
int rc;
|
||||
|
||||
switch (cmd_id) {
|
||||
|
|
Loading…
Reference in New Issue