~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to snmplib/snmpTCPIPv6Domain.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        return strdup("TCP/IPv6: unknown");
98
98
    } else {
99
99
        char addr[INET6_ADDRSTRLEN];
100
 
        char tmp[INET6_ADDRSTRLEN + 8];
 
100
        char tmp[INET6_ADDRSTRLEN + 18];
101
101
 
102
102
        sprintf(tmp, "TCP/IPv6: [%s]:%hd",
103
103
                inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
120
120
 
121
121
    if (t != NULL && t->sock >= 0) {
122
122
        while (rc < 0) {
123
 
            rc = recv(t->sock, buf, size, 0);
 
123
            rc = recvfrom(t->sock, buf, size, 0, NULL, 0);
124
124
            if (rc < 0 && errno != EINTR) {
125
125
                DEBUGMSGTL(("netsnmp_tcp6", "recv fd %d err %d (\"%s\")\n",
126
126
                            t->sock, errno, strerror(errno)));
157
157
 
158
158
    if (t != NULL && t->sock >= 0) {
159
159
        while (rc < 0) {
160
 
            rc = send(t->sock, buf, size, 0);
 
160
            rc = sendto(t->sock, buf, size, 0, NULL, 0);
161
161
            if (rc < 0 && errno != EINTR) {
162
162
                break;
163
163
            }