diff options
author | Karl Ramm <kcr@1ts.org> | 2009-12-18 15:33:18 +0000 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2009-12-18 15:33:18 +0000 |
commit | bdebdf31d76e65ee7a45ffaea219510fc7b9a3a7 (patch) | |
tree | feb9f50d68d1f8119b05c7b5a5539294e31d9a93 /zwgc | |
parent | 88e556d598741de725a73b757c072dc473e3e9c0 (diff) |
roleplay accordingly with sin_len and sin6_len values on BSD systems
Diffstat (limited to 'zwgc')
-rw-r--r-- | zwgc/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/zwgc/main.c b/zwgc/main.c index 6836d5e..fae85b9 100644 --- a/zwgc/main.c +++ b/zwgc/main.c @@ -396,9 +396,8 @@ create_punt_reply(int_dictionary_binding *punt) void notice_handler(ZNotice_t *notice) { -#ifndef HAVE_ARES + int ret; char node[MAXDNAME]; -#endif #if defined(CMU_ZWGCPLUS) list_add_notice(notice); @@ -415,10 +414,12 @@ notice_handler(ZNotice_t *notice) notice_callback, notice); #else - getnameinfo((const struct sockaddr *)&(notice->z_sender_sockaddr), - sizeof(notice->z_sender_sockaddr), - node, sizeof(node), NULL, 0, 0); - + ret = getnameinfo((const struct sockaddr *)&(notice->z_sender_sockaddr), + sizeof(notice->z_sender_sockaddr), + node, sizeof(node), NULL, 0, 0); + if (ret != 0) + strcpy(node, "?"); + process_notice(notice, node); #ifdef CMU_ZWGCPLUS /* Let list_del_notice clean up for us. */ |