From: <sar...@us...> - 2008-06-26 14:06:56
|
Update of /cvsroot/ceps/pradmin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30581 Modified Files: configure.in device.c gateway.c pserver.c Log Message: Merging the 3.24 release branch changes to MAIN Index: configure.in =================================================================== RCS file: /cvsroot/ceps/pradmin/configure.in,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** configure.in 24 Feb 2008 20:30:13 -0000 1.24 --- configure.in 26 Jun 2008 14:06:53 -0000 1.25 *************** *** 5,9 **** AC_INIT(pradmin.c) ! VERSION=2.68 PACKAGE=pradmin --- 5,9 ---- AC_INIT(pradmin.c) ! VERSION=2.69 PACKAGE=pradmin Index: device.c =================================================================== RCS file: /cvsroot/ceps/pradmin/device.c,v retrieving revision 2.52 retrieving revision 2.53 diff -C2 -d -r2.52 -r2.53 *** device.c 24 Feb 2008 20:30:13 -0000 2.52 --- device.c 26 Jun 2008 14:06:53 -0000 2.53 *************** *** 439,443 **** fprintf(pager_pp, "%-*s : %s\n", NAMEWIDTH, "Email Contact", sp ? sp : NOTSET); ! if ( 0 != strcmp( type, "BP") ) { sp=fndfield("gpsflag", mflp); --- 439,443 ---- fprintf(pager_pp, "%-*s : %s\n", NAMEWIDTH, "Email Contact", sp ? sp : NOTSET); ! if ( (NULL != type) && ( 0 != strcmp( type, "BP") )) { sp=fndfield("gpsflag", mflp); *************** *** 1037,1040 **** --- 1037,1079 ---- } + int + set_device_gpsflag(const char *kw, char *value, char **junk) + { + + struct dbfield *fldp=NULL; + const char *devtype=NULL; + int ret=0; + const char *value2=NULL; + + if ((value2=get_bool(value))==NULL) + return(1); + + if (fldp=get_device_parm(devname)) + { + devtype=fndfield("type", fldp); + if ( (NULL != devtype) && ( 0 != strcmp( devtype, "BP") )) + { + char tmp[2]; + tmp[0] = value[0]; tmp[1] = 0; + ret = set_mainparm("gpsflag", tmp, NULL); + } else { + fprintf(stderr, "Device is of BP Type, So GPS Flag is not updated\n"); + ret = -1; + } + } else { + + fprintf(stderr, "Error in reading Device record from SDDB, So GPS Flag not updated\n"); + ret = -1; + } + + if (fldp) + { + free(fldp); + fldp = NULL; + } + + return ret; + } + int *************** *** 2594,2598 **** {"emailcon", "<Email Contact>", NULL, &genstr, 1, NULL, NULL, set_device_str, NULL}, {"critical", "<Y|N>", NULL, &genstr, 1, NULL, NULL, set_device_bool, NULL}, ! {"gpsflag", "<Y|N>", NULL, &genstr, 1, NULL, NULL, set_device_bool, NULL}, {"emailsupp", "<GPS Support|Non-GPS Supported|xer...@ci...>", NULL, &genstr, 1, NULL, NULL, set_device_emailsupp, NULL}, {"location", "<Location Info>", NULL, &genstr, 1, NULL, NULL, set_device_str, NULL}, --- 2633,2638 ---- {"emailcon", "<Email Contact>", NULL, &genstr, 1, NULL, NULL, set_device_str, NULL}, {"critical", "<Y|N>", NULL, &genstr, 1, NULL, NULL, set_device_bool, NULL}, ! /*{"gpsflag", "<Y|N>", NULL, &genstr, 1, NULL, NULL, set_device_bool, NULL},*/ ! {"gpsflag", "<Y|N>", NULL, &genstr, 1, NULL, NULL, set_device_gpsflag, NULL}, {"emailsupp", "<GPS Support|Non-GPS Supported|xer...@ci...>", NULL, &genstr, 1, NULL, NULL, set_device_emailsupp, NULL}, {"location", "<Location Info>", NULL, &genstr, 1, NULL, NULL, set_device_str, NULL}, *************** *** 2699,2705 **** --- 2739,2754 ---- * * $Log$ + * Revision 2.53 2008/06/26 14:06:53 saravanc + * Merging the 3.24 release branch changes to MAIN + * * Revision 2.52 2008/02/24 20:30:13 saravanc * Merging * + * Revision 2.51.2.3 2008/03/24 13:46:10 saravanc + * The critical bugs identified during the 3.24 testing have been fixed. + * The review comment incorporated. + * Coder: Sanal + * Reviewer: Brijesh, KC + * * Revision 2.51.2.2 2007/08/14 08:27:46 sanradha * GPS Flag will be displayed for all printers types except BP, when we issue Index: gateway.c =================================================================== RCS file: /cvsroot/ceps/pradmin/gateway.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -d -r2.27 -r2.28 *** gateway.c 24 Feb 2008 20:30:13 -0000 2.27 --- gateway.c 26 Jun 2008 14:06:53 -0000 2.28 *************** *** 859,863 **** char ownid[OWNIDLEN+1]; unsigned long subnetip; ! char C='N'; if (str2ip(gateway, &subnetip)!=0) --- 859,863 ---- char ownid[OWNIDLEN+1]; unsigned long subnetip; ! char Arr[1024]; if (str2ip(gateway, &subnetip)!=0) *************** *** 879,884 **** printf(" Deleting gateway is highly discouraged if it contains live printers \n\n"); printf(" Do you want to go ahead and delete the gateway ? (Y/N)\n"); ! C = getchar(); ! if ( 'Y' == C) { if ((flp=SddbRequest(DBREQ_DELETE, "netinfo", NULL, ownid, &seqno, fields))==NULL) --- 879,884 ---- printf(" Deleting gateway is highly discouraged if it contains live printers \n\n"); printf(" Do you want to go ahead and delete the gateway ? (Y/N)\n"); ! scanf("%s",Arr); ! if ( ( Arr[0] == 'Y' ) || ( Arr[0] == 'y' )) { if ((flp=SddbRequest(DBREQ_DELETE, "netinfo", NULL, ownid, &seqno, fields))==NULL) *************** *** 887,892 **** --- 887,896 ---- return(1); } + printf("Gateway \"%s\" is successfully deleted\n", gateway); free(flp); + } else { + + printf("Gateway \"%s\" is not deleted\n", gateway); } *************** *** 1274,1280 **** --- 1278,1293 ---- /* * $Log$ + * Revision 2.28 2008/06/26 14:06:53 saravanc + * Merging the 3.24 release branch changes to MAIN + * * Revision 2.27 2008/02/24 20:30:13 saravanc * Merging * + * Revision 2.26.8.2 2008/03/24 13:46:10 saravanc + * The critical bugs identified during the 3.24 testing have been fixed. + * The review comment incorporated. + * Coder: Sanal + * Reviewer: Brijesh, KC + * * Revision 2.26.8.1 2007/08/10 09:58:41 sanradha * Displays meesage to get confirmation for deleting a Gateway. Index: pserver.c =================================================================== RCS file: /cvsroot/ceps/pradmin/pserver.c,v retrieving revision 2.27 retrieving revision 2.28 diff -C2 -d -r2.27 -r2.28 *** pserver.c 24 Feb 2008 20:30:13 -0000 2.27 --- pserver.c 26 Jun 2008 14:06:53 -0000 2.28 *************** *** 613,624 **** } ! if ( (sddbmaster=fndfield("sddbmaster", flp)) && (strcmp(sddbmaster,"Y") ==0 )) { ! char C; printf("Given server is a Master Server\n"); printf("Do you want to go ahead and delete? (Y/N)\n"); ! C = getchar(); free(flp); ! if( 'Y' == C) { del_device("del", NULL, NULL); --- 613,624 ---- } ! if ( (sddbmaster=fndfield("sddbmaster", flp)) && (NULL != sddbmaster) && (strcmp(sddbmaster,"Y") ==0 )) { ! char Arr[1024]; printf("Given server is a Master Server\n"); printf("Do you want to go ahead and delete? (Y/N)\n"); ! scanf("%s",Arr); free(flp); ! if ( ( Arr[0] == 'Y' ) || ( Arr[0] == 'y' )) { del_device("del", NULL, NULL); *************** *** 633,636 **** --- 633,639 ---- free(flp); + } else { + + printf("Master server is not deleted \n"); } *************** *** 843,846 **** --- 846,850 ---- struct dbfield *flp=NULL; + zerofield(downfields); updfield("pserver", pserver, downfields); *************** *** 859,863 **** } ! if ( (sddbmaster=fndfield("sddbmaster", flp)) && (strcmp(sddbmaster,"Y") ==0 )) { // Input Server is a Master Server --- 863,867 ---- } ! if ( (sddbmaster=fndfield("sddbmaster", flp)) && (sddbmaster != NULL) && (strcmp(sddbmaster,"Y") ==0 )) { // Input Server is a Master Server *************** *** 865,873 **** if (strcmp(value, "D")==0 || strcmp(value, "M")==0) { ! char C; printf("Given server is a Master Server\n"); printf("Do you want to continue? (Y/N)\n"); ! C = getchar(); ! if( 'Y' == C) { sddbownid=fndfield("sddbownid", flp) ; --- 869,877 ---- if (strcmp(value, "D")==0 || strcmp(value, "M")==0) { ! char Arr[1024]; printf("Given server is a Master Server\n"); printf("Do you want to continue? (Y/N)\n"); ! scanf("%s",Arr); ! if ( ( Arr[0] == 'Y' ) || ( Arr[0] == 'y' )) { sddbownid=fndfield("sddbownid", flp) ; *************** *** 881,884 **** --- 885,889 ---- set_pserverparm("duser", fndfield("lmodu", downfields)); } else { + printf("State of Master Server is not updated\n"); return 0; } *************** *** 1186,1189 **** --- 1191,1203 ---- /* * $Log$ + * Revision 2.28 2008/06/26 14:06:53 saravanc + * Merging the 3.24 release branch changes to MAIN + * + * Revision 2.26.2.2 2008/03/24 13:46:10 saravanc + * The critical bugs identified during the 3.24 testing have been fixed. + * The review comment incorporated. + * Coder: Sanal + * Reviewer: Brijesh, KC + * * Revision 2.27 2008/02/24 20:30:13 saravanc * Merging |