PERFORCE change 125703 for review
Matus Harvan
mharvan at FreeBSD.org
Sun Aug 26 04:04:14 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125703
Change 125703 by mharvan at mharvan_bike-planet on 2007/08/26 11:03:50
cleanup for UDP plugin
Affected files ...
.. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#15 edit
Differences ...
==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#15 (text+ko) ====
@@ -246,22 +246,6 @@
n = recvfrom(data->fd, packet, sizeof(packet), 0,
(struct sockaddr *) &conn->addr, &conn->addrlen);
-#ifdef DEBUG
- char host[NI_MAXHOST];
- char serv[NI_MAXSERV];
- if (getnameinfo((struct sockaddr *) &conn->addr, conn->addrlen,
- host, sizeof(host), serv, sizeof(serv),
- NI_NUMERICHOST | NI_DGRAM) ) {
- fprintf(stderr, "getnameinfo failed: %s\n",
- gai_strerror(errno));
- } else {
- fprintf(stderr, "received traffic from client %s:%s\n",
- host, serv);
- }
-
- fprintf(stderr, "plugin_udp: plugin_receive: recv return 0\n");
-#endif /* DEBUG */
-
if (n == -1) {
/* report a broken plugin */
plugin_report(pl, 0, REPORT_ERROR_RECEIVE);
@@ -318,6 +302,7 @@
} else {
*consumed = 0;
warn("plugin_send: send returned %d", nwrite);
+ plugin_report(pl, clid, REPORT_ERROR_SEND);
return (SEND_ERROR);
}
}
More information about the p4-projects
mailing list