Commit daced199 authored by Claes Sjofors's avatar Claes Sjofors

Remote bugfix for more than 25 remnodes

parent fb28d012
...@@ -152,6 +152,7 @@ static void AddTransports() ...@@ -152,6 +152,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -175,6 +176,7 @@ static void AddTransports() ...@@ -175,6 +176,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -199,6 +201,7 @@ static void AddTransports() ...@@ -199,6 +201,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -223,6 +226,7 @@ static void AddTransports() ...@@ -223,6 +226,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -246,6 +250,7 @@ static void AddTransports() ...@@ -246,6 +250,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -269,6 +274,7 @@ static void AddTransports() ...@@ -269,6 +274,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -296,6 +302,7 @@ static void AddTransports() ...@@ -296,6 +302,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -319,6 +326,7 @@ static void AddTransports() ...@@ -319,6 +326,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -343,6 +351,7 @@ static void AddTransports() ...@@ -343,6 +351,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -367,6 +376,7 @@ static void AddTransports() ...@@ -367,6 +376,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -389,6 +399,7 @@ static void AddTransports() ...@@ -389,6 +399,7 @@ static void AddTransports()
tp[tpcount].cpid = -1; tp[tpcount].cpid = -1;
tp[tpcount].first = true; tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid; remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++; tpcount++;
...@@ -527,7 +538,7 @@ int main() ...@@ -527,7 +538,7 @@ int main()
errh_SetStatus(0); errh_SetStatus(0);
exit(1); exit(1);
} }
for (i = 0; i < tpmax; i++) for (i = 0; i < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]); i++)
remcfgp->RemNodeObjects[i] = pwr_cNObjid; remcfgp->RemNodeObjects[i] = pwr_cNObjid;
} else { } else {
errh_Info("No RemoteConfig object found, rs_remotehandler will not run"); errh_Info("No RemoteConfig object found, rs_remotehandler will not run");
......
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