Changeset 1225

Show
Ignore:
Timestamp:
03/11/10 06:26:17 (2 years ago)
Author:
Gary
Message:

unxsBind idnsAdmin resource.c fix for #117 must be reviewed and tested carefully.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/unxsBind/interfaces/admin/resource.c

    r1220 r1225  
    27482748//messages are displayed, if incorrecty set, probably you will miss part of the error  
    27492749//text, or worst make idnsAdmin to crash! 
    2750 #define BIND_9_6 
     2750//#define BIND_9_6 
    27512751 
    27522752        //This function will create a zonefile online and run named-checkzone 
     
    28562856                while((field2=mysql_fetch_row(res2))) 
    28572857                { 
     2858                        char cRRType[9]=""; 
     2859 
    28582860                        sscanf(field2[2],"%u",&uRRType); 
     2861                        sprintf(cRRType,"%.8s",GetRRType(uRRType)); 
     2862 
    28592863                        if(field2[1][0]!='0') strcpy(cTTL,field2[1]); 
     2864 
    28602865                        //Do not write TTL if cName is a $GENERATE line 
    28612866                        if(strstr(field2[0],"$GENERATE")==NULL) 
    28622867                        { 
    2863                                 if(strcmp(GetRRType(uRRType),"SRV")) 
    2864                                         fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
    2865                                                         field2[0], 
    2866                                                         cTTL, 
    2867                                                         GetRRType(uRRType), 
    2868                                                         field2[3], 
    2869                                                         field2[4]); 
    2870                                 else 
     2868                                if(!strcmp(cRRType,"SRV")) 
    28712869                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
    28722870                                                        field2[0], 
    28732871                                                        cTTL, 
    2874                                                         GetRRType(uRRType), 
     2872                                                        cRRType, 
    28752873                                                        field2[3], 
    28762874                                                        field2[4], 
    28772875                                                        field2[5], 
    28782876                                                        field2[6]); 
     2877                                else if(!strcmp(cRRType,"NAPTR")) 
     2878                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
     2879                                                        field2[0], 
     2880                                                        cTTL, 
     2881                                                        cRRType, 
     2882                                                        field2[3], 
     2883                                                        field2[4], 
     2884                                                        field2[5], 
     2885                                                        field2[6]); 
     2886                                else if(1) 
     2887                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
     2888                                                        field2[0], 
     2889                                                        cTTL, 
     2890                                                        cRRType, 
     2891                                                        field2[3], 
     2892                                                        field2[4]); 
    28792893                        } 
    28802894                        else 
     2895                        { 
    28812896                                fprintf(zfp,"%s\t%s\t%s\t%s\n", 
    28822897                                                field2[0], 
    2883                                                 GetRRType(uRRType), 
     2898                                                cRRType, 
    28842899                                                field2[3], 
    28852900                                                field2[4]); 
     2901                        } 
    28862902                } 
    28872903                mysql_free_result(res2);