Update of /cvsroot/netadm/gwc/gwcadmd
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16114/gwcadmd
Modified Files:
main.c
Log Message:
ADD:
add exception for the signal power setting.
from now, signal power will be control only if SNMP set up properly and
the target AP is CISCO's
Index: main.c
===================================================================
RCS file: /cvsroot/netadm/gwc/gwcadmd/main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** main.c 31 Jan 2006 14:19:38 -0000 1.2
--- main.c 31 Jan 2006 16:03:44 -0000 1.3
***************
*** 1130,1138 ****
out("starting...\n");
! #if 0
getif_info(1);
! is_radio_on(NULL);
! get_radio_maxpw();
! #endif
while (TRUE) {
--- 1130,1141 ----
out("starting...\n");
!
getif_info(1);
!
! if ( csm->snmp == SNMP_SUPPORT && csm->target == TARGET_CISCO_AP ){
! is_radio_on(NULL);
! get_radio_maxpw();
! }
!
while (TRUE) {
***************
*** 1173,1181 ****
}
! if (pthread_create(&pid, &attr, is_radio_on, (void *) NULL) !=
! 0) {
! out("Can't create is_radio_on thread: %s\n",
! strerror(errno));
! goto EXIT2;
}
--- 1176,1186 ----
}
! if ( csm->snmp == SNMP_SUPPORT && csm->target == TARGET_CISCO_AP ){
! if (pthread_create(&pid, &attr, is_radio_on, (void *) NULL) !=
! 0) {
! out("Can't create is_radio_on thread: %s\n",
! strerror(errno));
! goto EXIT2;
! }
}
***************
*** 1200,1207 ****
bQuit = TRUE;
} else if (!ret) {
! if (fork() == 0) {
! close(fd);
! goto EXIT2;
! }
continue;
} else {
--- 1205,1209 ----
bQuit = TRUE;
} else if (!ret) {
! out ("timeout continue ...\n");
continue;
} else {
***************
*** 1220,1223 ****
--- 1222,1227 ----
if (!strcmp(cmd, "auto_apply")) {
+
+ if ( csm->snmp == SNMP_SUPPORT && csm->target == TARGET_CISCO_AP ){
if (pthread_create
(&pid, &attr, auto_apply,
***************
*** 1226,1229 ****
--- 1230,1237 ----
continue;
}
+ }
+ else {
+ out ("%s received, but no valid SNMP and no CISCO AP\n", cmd);
+ }
}
|