2009-02-02 16:57:30 +00:00
|
|
|
--- a/mini_snmpd.c
|
|
|
|
+++ b/mini_snmpd.c
|
2010-04-17 13:16:17 +00:00
|
|
|
@@ -134,7 +134,7 @@ static void handle_udp_client(void)
|
2009-02-02 16:57:30 +00:00
|
|
|
} else if (rv != g_udp_client.size) {
|
|
|
|
lprintf(LOG_WARNING, "could not send packet to UDP client %s:%d: "
|
|
|
|
"only %d of %d bytes written\n", inet_ntoa(sockaddr.sin_addr),
|
|
|
|
- sockaddr.sin_port, rv, g_udp_client.size);
|
|
|
|
+ sockaddr.sin_port, rv, (int) g_udp_client.size);
|
|
|
|
}
|
|
|
|
#ifdef DEBUG
|
|
|
|
dump_packet(&g_udp_client);
|
2010-04-17 13:16:17 +00:00
|
|
|
@@ -211,7 +211,7 @@ static void handle_tcp_client_write(clie
|
2009-02-02 16:57:30 +00:00
|
|
|
} else if (rv != client->size) {
|
|
|
|
lprintf(LOG_WARNING, "could not send packet to TCP client %s:%d: "
|
|
|
|
"only %d of %d bytes written\n", inet_ntoa(sockaddr.sin_addr),
|
|
|
|
- sockaddr.sin_port, rv, client->size);
|
|
|
|
+ sockaddr.sin_port, rv, (int) client->size);
|
|
|
|
close(client->sockfd);
|
|
|
|
client->sockfd = -1;
|
|
|
|
return;
|
|
|
|
--- a/utils.c
|
|
|
|
+++ b/utils.c
|
2010-04-17 13:16:17 +00:00
|
|
|
@@ -106,7 +106,7 @@ void dump_packet(const client_t *client)
|
2009-02-02 16:57:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
lprintf(LOG_DEBUG, "%s %u bytes %s %s:%d (%s)\n",
|
|
|
|
- client->outgoing ? "transmitted" : "received", client->size,
|
|
|
|
+ client->outgoing ? "transmitted" : "received", (int) client->size,
|
|
|
|
client->outgoing ? "to" : "from", inet_ntoa(client_addr),
|
|
|
|
ntohs(client->port), buffer);
|
|
|
|
}
|