提交 bc177a4b authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-3475 --resolve

上级 2366f429
Mon Aug 1 10:01:41 CDT 2011 Tue Aug 2 13:51:40 CDT 2011
...@@ -416,11 +416,15 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n, ...@@ -416,11 +416,15 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
buflen += sizeof(struct hep_iphdr); buflen += sizeof(struct hep_iphdr);
} }
#if SU_HAVE_IN6 #if SU_HAVE_IN6
else { else if(su->su_family == AF_INET6) {
memcpy(buffer+buflen, &hep_ip6header, sizeof(struct hep_ip6hdr)); memcpy(buffer+buflen, &hep_ip6header, sizeof(struct hep_ip6hdr));
buflen += sizeof(struct hep_ip6hdr); buflen += sizeof(struct hep_ip6hdr);
} }
#endif #endif
else {
su_perror("error: tport_logging: capture: unsupported protocol family");
goto done;
}
for (i = 0; i < iovused && n > 0; i++) { for (i = 0; i < iovused && n > 0; i++) {
size_t len = iov[i].mv_len; size_t len = iov[i].mv_len;
...@@ -437,14 +441,16 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n, ...@@ -437,14 +441,16 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
/* check if we have error i.e. capture server is down */ /* check if we have error i.e. capture server is down */
if ((error = su_soerror(mr->mr_capt_sock))) { if ((error = su_soerror(mr->mr_capt_sock))) {
su_perror("capture socket error"); su_perror("error: tport_logging: capture socket error");
return; goto done;
} }
su_send(mr->mr_capt_sock, buffer, buflen, 0); su_send(mr->mr_capt_sock, buffer, buflen, 0);
done:
/* Now we release it */ /* Now we release it */
if(buffer) free(buffer); if(buffer) free(buffer);
return;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论