FS-3475 --resolve

This commit is contained in:
Anthony Minessale 2011-08-02 13:51:57 -05:00
parent 2366f4295b
commit bc177a4b28
2 changed files with 11 additions and 5 deletions

View File

@ -1 +1 @@
Mon Aug 1 10:01:41 CDT 2011 Tue Aug 2 13:51:40 CDT 2011

View File

@ -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,
/* 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;
} }