Fix various typos in log messages
Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 Reviewed-on: https://gerrit.osmocom.org/115 Reviewed-by: Neels Hofmeyr <nhofmeyr@sysmocom.de> Tested-by: Jenkins Builder
This commit is contained in:
parent
cccf025255
commit
8b61a0555a
|
@ -68,7 +68,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
#par,inst par,dummy_b);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
snprintf((char*)dest, left, "%s", l_dest);\
|
||||
|
@ -86,7 +86,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
"%-30s[%04X] [%s]\n",#par,inst par,dummy_b);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
snprintf((char*)dest, left, "%s", l_dest);\
|
||||
|
@ -104,7 +104,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
#par,inst par, dummy_b);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
snprintf((char*)dest, left, "%s", l_dest);\
|
||||
|
@ -116,7 +116,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
#par, inst par);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
|
||||
|
@ -143,7 +143,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
lenval = *((inst par) - 1);\
|
||||
if( (lenval + 33) >= left ){\
|
||||
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||
|
@ -170,7 +170,7 @@ smpp34_dumpPdu(uint32_t type, uint8_t *dest, int size_dest, void* tt)
|
|||
memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||
if( (l_lenval + 33) >= left ){\
|
||||
PUTLOG("[%s:%s(%s)]", par, inst par, \
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
|
||||
|
|
|
@ -63,7 +63,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
lenval = sizeof(uint32_t);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
_str(inst par,dummy_b);\
|
||||
|
@ -81,7 +81,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
lenval = sizeof(uint16_t);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
_str(inst par,dummy_b);\
|
||||
|
@ -98,7 +98,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
lenval = sizeof(uint8_t);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
_str(inst par,dummy_b);\
|
||||
|
@ -123,7 +123,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
lenval = strlen((char*)inst par) + 1;\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[len(%s):%d(%s)]", par, lenval, \
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( lenval > sizeval ){\
|
||||
|
@ -143,7 +143,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
lenval = *((inst par) - 1);\
|
||||
if( lenval >= left ){\
|
||||
PUTLOG("[leng %s:%d(%s)]", par, lenval,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( lenval >= sizeval ){\
|
||||
|
@ -162,7 +162,7 @@ smpp34_pack(uint32_t type, uint8_t *ptrBuf, int ptrSize, int *ptrLen, void* tt)
|
|||
memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||
if( l_lenval >= left ){\
|
||||
PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( l_lenval > sizeval ){\
|
||||
|
|
|
@ -60,7 +60,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
lenval = sizeof( uint32_t );\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[%s:%08X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
memcpy(&inst par, aux, lenval);\
|
||||
|
@ -78,7 +78,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
lenval = sizeof( uint16_t );\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[%s:%04X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
}\
|
||||
memcpy(&inst par, aux, lenval);\
|
||||
|
@ -96,7 +96,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
lenval = sizeof( uint8_t );\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[%s:%02X(%s)]", par, inst par,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
memcpy(&inst par, aux, lenval);\
|
||||
|
@ -129,7 +129,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
lenval = strlen( (char*) aux ) + 1;\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[len(%s):%d(%s)]", par, lenval, \
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( lenval > size ){\
|
||||
|
@ -147,7 +147,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
lenval = *((inst par) - 1);\
|
||||
if( lenval > left ){\
|
||||
PUTLOG("[leng %s:%d(%s)]", par, lenval,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( lenval > size ){\
|
||||
|
@ -165,7 +165,7 @@ smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
|
|||
memcpy(&l_lenval, (inst par - sizeof(uint16_t)), sizeof(uint16_t));\
|
||||
if( l_lenval > left ){\
|
||||
PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\
|
||||
"Value lenght exceed buffer lenght");\
|
||||
"Value length exceed buffer length");\
|
||||
return( -1 );\
|
||||
};\
|
||||
if( l_lenval > size ){\
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Read from socket (This is a sample, must be more complex) **********/
|
||||
ret = recv(sock_tcp, local_buffer, 4, MSG_PEEK);
|
||||
if( ret != 4 ){ printf("Error in recv(PEEK)\n");return( -1 );};
|
||||
memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get lenght PDU */
|
||||
memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get length PDU */
|
||||
local_buffer_len = ntohl( tempo );
|
||||
ret = recv(sock_tcp, local_buffer, local_buffer_len, 0);
|
||||
if( ret != local_buffer_len ){
|
||||
|
|
Loading…
Reference in New Issue