const: Make the data parameter for unpack const

This commit is contained in:
Holger Hans Peter Freyther 2013-09-05 22:43:40 +02:00
parent a18bad9896
commit ef554d0880
2 changed files with 6 additions and 6 deletions

View File

@ -256,6 +256,6 @@ int smpp34_dumpPdu2(uint8_t *dest, int size_dest, void* tt);
int smpp34_pack(uint32_t type,uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt); int smpp34_pack(uint32_t type,uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt);
int smpp34_pack2(uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt); int smpp34_pack2(uint8_t *ptrBuf,int ptrSize,int *ptrLen,void* tt);
int smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen); int smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen);
int smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen); int smpp34_unpack2(void* tt, const uint8_t *ptrBuf, int ptrLen);
#endif /* _STB_H_ */ #endif /* _STB_H_ */

View File

@ -40,12 +40,12 @@ extern char *ptrerror;
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
int int
smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen) smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
{ {
char dummy_b[SMALL_BUFF]; char dummy_b[SMALL_BUFF];
uint8_t *ini = ptrBuf; const uint8_t *ini = ptrBuf;
uint8_t *aux = ptrBuf; const uint8_t *aux = ptrBuf;
int lenval = 0; int lenval = 0;
int left = ptrLen; int left = ptrLen;
int lefterror = 0; int lefterror = 0;
@ -243,7 +243,7 @@ smpp34_unpack(uint32_t type, void* tt, uint8_t *ptrBuf, int ptrLen)
}; };
int int
smpp34_unpack2(void* tt, uint8_t *ptrBuf, int ptrLen) smpp34_unpack2(void* tt, const uint8_t *ptrBuf, int ptrLen)
{ {
uint32_t cmdid; uint32_t cmdid;
uint32_t tempo; uint32_t tempo;