aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/smpp34_dumpPdu.c12
-rw-r--r--src/smpp34_pack.c12
-rw-r--r--src/smpp34_unpack.c12
-rw-r--r--test_apps/recv_and_unpack.inc2
4 files changed, 19 insertions, 19 deletions
diff --git a/src/smpp34_dumpPdu.c b/src/smpp34_dumpPdu.c
index 76cd70b..89d6e53 100644
--- a/src/smpp34_dumpPdu.c
+++ b/src/smpp34_dumpPdu.c
@@ -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");\
diff --git a/src/smpp34_pack.c b/src/smpp34_pack.c
index 1916172..b36e7a4 100644
--- a/src/smpp34_pack.c
+++ b/src/smpp34_pack.c
@@ -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 ){\
diff --git a/src/smpp34_unpack.c b/src/smpp34_unpack.c
index e378b0b..f498d01 100644
--- a/src/smpp34_unpack.c
+++ b/src/smpp34_unpack.c
@@ -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 ){\
diff --git a/test_apps/recv_and_unpack.inc b/test_apps/recv_and_unpack.inc
index 090ea11..1b85a19 100644
--- a/test_apps/recv_and_unpack.inc
+++ b/test_apps/recv_and_unpack.inc
@@ -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 ){