Commit 4d0ffc5b authored by Pekka Pessi's avatar Pekka Pessi

Fixed type of msg_addrlen() to size_t in msg_addr.h/msg.c.

POSIX socklen_t is not used in addrinfo. We use addrinfo.

darcs-hash:20060512085947-65a35-76c37eeb7a4fd6f9a8ad32a75ebe0ee16e470761.gz
parent 77b6f47c
......@@ -239,7 +239,7 @@ void msg_addr_zero(msg_t *msg)
}
/** Get pointer to address length. */
socklen_t *msg_addrlen(msg_t *msg)
size_t *msg_addrlen(msg_t *msg)
{
return &msg->m_addrinfo.ai_addrlen;
}
......
......@@ -47,7 +47,7 @@ SOFIA_BEGIN_DECLS
SOFIAPUBFUN void msg_addr_zero(msg_t *msg);
SOFIAPUBFUN su_addrinfo_t *msg_addrinfo(msg_t *msg);
SOFIAPUBFUN su_sockaddr_t *msg_addr(msg_t *msg);
SOFIAPUBFUN socklen_t *msg_addrlen(msg_t *msg);
SOFIAPUBFUN size_t *msg_addrlen(msg_t *msg);
SOFIAPUBFUN void msg_addr_copy(msg_t *dst, msg_t const *src);
SOFIAPUBFUN int msg_errno(msg_t const *msg);
......
......@@ -64,20 +64,6 @@ void usage(void)
fprintf(stderr, "usage: %s [-v]\n", name);
}
static int msg_time_test(void);
static int test_header_parsing(void);
static int hash_test(void);
static int test_msg_parsing(void);
static int test_warning(void);
static int test_msg_error(void);
static int test_mclass(void);
static int test_copy(void);
static int test_mime(void);
static int test_mime2(void);
static int test_serialize(void);
static int random_test(void);
static int msg_time_test(void)
{
char buf[32];
......@@ -155,6 +141,15 @@ static int msg_time_test(void)
return 0;
}
static int addr_test(void)
{
BEGIN();
TEST(sizeof(socklen_t), sizeof(size_t));
END();
}
int test_header_parsing(void)
{
BEGIN();
......@@ -1688,6 +1683,7 @@ int main(int argc, char *argv[])
}
retval |= msg_time_test(); fflush(stdout);
retval |= addr_test(); fflush(stdout);
retval |= hash_test(); fflush(stdout);
retval |= random_test(); fflush(stdout);
retval |= test_header_parsing(); fflush(stdout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment