~ubuntu-branches/ubuntu/precise/openafs/precise-proposed

« back to all changes in this revision

Viewing changes to src/viced/callback.c

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2012-03-28 17:25:05 UTC
  • mfrom: (28.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20120328172505-y9iycrlfhtfsn7mv
Tags: 1.6.1-1
* New upstream release.
  - Do not ignore all InlineBulkStatus errors in file server.
  - Support for Linux 3.3 and 3.4.
  - Fix incorrect kernel error handling in afs_notify_change.
  - Fix locking around RXS_PreparePacket.

Show diffs side-by-side

added added

removed removed

Lines of Context:
812
812
    int hostindex;
813
813
    char hoststr[16];
814
814
 
815
 
    ViceLog(7,
816
 
            ("BCB: BreakCallBack(Host %p all but %s:%d, (%u,%u,%u))\n",
817
 
             xhost, afs_inet_ntoa_r(xhost->host, hoststr), ntohs(xhost->port),
818
 
             fid->Volume, fid->Vnode, fid->Unique));
 
815
    if (xhost)
 
816
        ViceLog(7,
 
817
                ("BCB: BreakCallBack(Host %p all but %s:%d, (%u,%u,%u))\n",
 
818
                 xhost, afs_inet_ntoa_r(xhost->host, hoststr), ntohs(xhost->port),
 
819
                 fid->Volume, fid->Vnode, fid->Unique));
 
820
    else
 
821
        ViceLog(7,
 
822
                ("BCB: BreakCallBack(No Host, (%u,%u,%u))\n",
 
823
                fid->Volume, fid->Vnode, fid->Unique));
819
824
 
820
825
    H_LOCK;
821
826
    cbstuff.BreakCallBacks++;
823
828
    if (!fe) {
824
829
        goto done;
825
830
    }
826
 
    hostindex = h_htoi(xhost);
 
831
    hostindex = xhost ? h_htoi(xhost) : 0;
827
832
    cb = itocb(fe->firstcb);
828
833
    if (!cb || ((fe->ncbs == 1) && (cb->hhead == hostindex) && !flag)) {
829
834
        /* the most common case is what follows the || */
3006
3011
            if (host->callback_rxcon)
3007
3012
                rx_DestroyConnection(host->callback_rxcon);
3008
3013
            host->callback_rxcon = conns[multi_i];
3009
 
            h_DeleteHostFromAddrHashTable_r(host->host, host->port, host);
 
3014
            /* add then remove */
 
3015
            addInterfaceAddr_r(host, interfaces[multi_i].addr,
 
3016
                                     interfaces[multi_i].port);
 
3017
            removeInterfaceAddr_r(host, host->host, host->port);
3010
3018
            host->host = interfaces[multi_i].addr;
3011
3019
            host->port = interfaces[multi_i].port;
3012
 
            h_AddHostToAddrHashTable_r(host->host, host->port, host);
3013
3020
            connSuccess = conns[multi_i];
3014
3021
            rx_SetConnDeadTime(host->callback_rxcon, 50);
3015
3022
            rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
3102
3109
            if (host->callback_rxcon)
3103
3110
                rx_DestroyConnection(host->callback_rxcon);
3104
3111
            host->callback_rxcon = conns[multi_i];
3105
 
            h_DeleteHostFromAddrHashTable_r(host->host, host->port, host);
 
3112
            /* add then remove */
 
3113
            addInterfaceAddr_r(host, interfaces[multi_i].addr,
 
3114
                                     interfaces[multi_i].port);
 
3115
            removeInterfaceAddr_r(host, host->host, host->port);
3106
3116
            host->host = interfaces[multi_i].addr;
3107
3117
            host->port = interfaces[multi_i].port;
3108
 
            h_AddHostToAddrHashTable_r(host->host, host->port, host);
3109
3118
            connSuccess = conns[multi_i];
3110
3119
            rx_SetConnDeadTime(host->callback_rxcon, 50);
3111
3120
            rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);