Commit a5849150 authored by ml's avatar ml

*** empty log message ***

parent 49eb5662
......@@ -67,7 +67,7 @@ trimQ(
/** Fetches a cached class.
* If the class is not in the cache then is it fetched from the remote node
* If the class is not in the cache then it's fetched from the remote node
*
* @return NULL if an error or classes are equal else a pointer to the class
*/
......@@ -160,6 +160,7 @@ cmvolc_GetCachedClass (
tgt.nid = np->nid;
tgt.qix = net_cProcHandler;
smp->ver = net_cVersion;
smp->cid = ccKey.cid;
smp->time = ap->cop->u.n.time;
smp->aidx = nextIdx;
......@@ -295,9 +296,6 @@ cmvolc_GetNonExistingClass (
}
printf("cmvolc_GetNonExistingClass\n");
gdb_Unlock;
do {
......@@ -308,6 +306,7 @@ cmvolc_GetNonExistingClass (
tgt.nid = np->nid;
tgt.qix = net_cProcHandler;
smp->ver = net_cVersion;
smp->cid = cid;
smp->aidx = nextIdx;
......@@ -387,9 +386,6 @@ cmvolc_GetNonExistingClass (
} else if (sts != NULL)
*sts = GDH__SUCCESS;
printf("cmvolc_GetNonExistingClass, success\n");
cleanup:
for (i = 0; i < msgcnt; i++)
......
......@@ -73,7 +73,7 @@ cmvolsm_GetCclass (
break;
}
rmp->ver = net_cVersion;
rmp->sts = 1;
rmp->equal = equal;
......@@ -117,6 +117,7 @@ cmvolsm_GetCclass (
errh_Error("cmvolsm_GetCclass. net_Alloc, size %d, cid %d, error %m", sizeof(*rmp), mp->cid, lsts);
return;
}
rmp->ver = net_cVersion;
}
......@@ -185,6 +186,7 @@ cmvolsm_GetGclass (
errh_Error("cvolsm_GetGclass. net_Alloc, size %d, cid %d, error %m", size, mp->cid, sts);
break;
}
rmp->ver = net_cVersion;
strcpy(rmp->vname, vp->g.name.orig);
rmp->gclass.time = cop->u.n.time;
......@@ -243,6 +245,7 @@ cmvolsm_GetGclass (
errh_Error("cmvolsm_GetGclass. net_Alloc, size %d, cid %d, error %m", sizeof(*rmp), mp->cid, lsts);
return;
}
rmp->ver = net_cVersion;
}
......
......@@ -33,7 +33,7 @@
%#define net_cVersion 8
%
% /** @note DO NOT change this number */
%#define net_cFirstCclassVersion 8
%#define net_cFirstCclassVersion 8 /* first version with cached classes */
%
%#define net_cSendRcvTmo 20000 /* Timeout (ms) used in pams_rcv_msgw calls */
%#define net_cProcHandler 110
......@@ -158,8 +158,12 @@ enum net_eEvent {
%}
#endif
/* Generic message header.
All class NETH messages MUST start with this header. */
/**< Generic message header.
* All class NETH messages MUST start with this header.
* This header needs a version(s) memeber(s), but we can't add
* due to backward compability.
* If you can skip this requirement, please add the version
*/
struct net_sMessage {
pwr_tBoolean xdr;
......@@ -1021,6 +1025,7 @@ struct net_sGclass {
struct net_sGetGclass {
net_sMessage hdr;
pwr_tUInt32 ver; /**< see net_sMeassge for comment */
pwr_tClassId cid;
pwr_tUInt32 aidx; /**< Starting attribute index */
};
......@@ -1033,6 +1038,7 @@ struct net_sGetGclass {
%
%typedef struct {
% net_sMessage hdr;/**< Header */
% pwr_tUInt32 ver;/**< see net_sMeassge for comment */
% pwr_tStatus sts;/**< Status */
%
% /* The data below is only valid if ODD(sts) */
......@@ -1067,6 +1073,9 @@ struct net_sGetGclass {
% if (!xdr_net_sMessage(xdrs, &objp->hdr)) {
% return (FALSE);
% }
% if (!xdr_pwr_tUInt32(xdrs, &objp->ver)) {
% return (FALSE);
% }
% if (!xdr_pwr_tStatus(xdrs, &objp->sts)) {
% return (FALSE);
% }
......@@ -1133,6 +1142,7 @@ struct net_sCclass {
struct net_sGetCclass {
net_sMessage hdr;
pwr_tUInt32 ver; /**< see net_sMeassge for comment */
pwr_tClassId cid;
pwr_tTime time;
pwr_tUInt32 aidx; /**< Starting attribute index */
......@@ -1144,6 +1154,7 @@ struct net_sGetCclass {
%
%typedef struct {
% net_sMessage hdr; /**< Header */
% pwr_tUInt32 ver; /**< see net_sMeassge for comment */
% pwr_tStatus sts; /**< Status */
% pwr_tBoolean equal; /**< The remote class is equal to the native */
%
......@@ -1184,6 +1195,9 @@ struct net_sGetCclass {
% if (!xdr_net_sMessage(xdrs, &objp->hdr)) {
% return (FALSE);
% }
% if (!xdr_pwr_tUInt32(xdrs, &objp->ver)) {
% return (FALSE);
% }
% if (!xdr_pwr_tStatus(xdrs, &objp->sts)) {
% return (FALSE);
% }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment