Changeset 1227

Show
Ignore:
Timestamp:
03/11/10 07:31:54 (2 years ago)
Author:
Hugo
Message:

idnsOrg/vdnsOrg: ticket #117 save commit

Location:
trunk/unxsBind/interfaces
Files:
2 modified

Legend:

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

    r1222 r1227  
    24602460                while((field2=mysql_fetch_row(res2))) 
    24612461                { 
     2462                        char cRRType[9]=""; 
     2463 
    24622464                        sscanf(field2[2],"%u",&uRRType); 
     2465                        sprintf(cRRType,"%.8s",GetRRType(uRRType)); 
     2466 
    24632467                        if(field2[1][0]!='0') strcpy(cTTL,field2[1]); 
     2468 
    24642469                        //Do not write TTL if cName is a $GENERATE line 
    24652470                        if(strstr(field2[0],"$GENERATE")==NULL) 
    24662471                        { 
    2467                                 if(strcmp(GetRRType(uRRType),"SRV")) 
    2468                                         fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
    2469                                                         field2[0], 
    2470                                                         cTTL, 
    2471                                                         GetRRType(uRRType), 
    2472                                                         field2[3], 
    2473                                                         field2[4]); 
    2474                                 else 
     2472                                if(!strcmp(cRRType,"SRV")) 
    24752473                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
    24762474                                                        field2[0], 
    24772475                                                        cTTL, 
    2478                                                         GetRRType(uRRType), 
     2476                                                        cRRType, 
    24792477                                                        field2[3], 
    24802478                                                        field2[4], 
    24812479                                                        field2[5], 
    24822480                                                        field2[6]); 
     2481                                else if(!strcmp(cRRType,"NAPTR")) 
     2482                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
     2483                                                        field2[0], 
     2484                                                        cTTL, 
     2485                                                        cRRType, 
     2486                                                        field2[3], 
     2487                                                        field2[4], 
     2488                                                        field2[5], 
     2489                                                        field2[6]); 
     2490                                else if(1) 
     2491                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
     2492                                                        field2[0], 
     2493                                                        cTTL, 
     2494                                                        cRRType, 
     2495                                                        field2[3], 
     2496                                                        field2[4]); 
    24832497                        } 
    24842498                        else 
     2499                        { 
    24852500                                fprintf(zfp,"%s\t%s\t%s\t%s\n", 
    24862501                                                field2[0], 
    2487                                                 GetRRType(uRRType), 
     2502                                                cRRType, 
    24882503                                                field2[3], 
    24892504                                                field2[4]); 
    2490                 } 
     2505                        } 
     2506                } 
     2507         
    24912508                mysql_free_result(res2); 
    24922509                fclose(zfp); 
  • trunk/unxsBind/interfaces/vorg/resource.c

    r1222 r1227  
    24062406                while((field2=mysql_fetch_row(res2))) 
    24072407                { 
     2408                        char cRRType[9]=""; 
     2409 
    24082410                        sscanf(field2[2],"%u",&uRRType); 
     2411                        sprintf(cRRType,"%.8s",GetRRType(uRRType)); 
     2412 
    24092413                        if(field2[1][0]!='0') strcpy(cTTL,field2[1]); 
     2414 
    24102415                        //Do not write TTL if cName is a $GENERATE line 
    24112416                        if(strstr(field2[0],"$GENERATE")==NULL) 
    24122417                        { 
    2413                                 if(strcmp(GetRRType(uRRType),"SRV")) 
    2414                                         fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
    2415                                                         field2[0], 
    2416                                                         cTTL, 
    2417                                                         GetRRType(uRRType), 
    2418                                                         field2[3], 
    2419                                                         field2[4]); 
    2420                                 else 
     2418                                if(!strcmp(cRRType,"SRV")) 
    24212419                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
    24222420                                                        field2[0], 
    24232421                                                        cTTL, 
    2424                                                         GetRRType(uRRType), 
     2422                                                        cRRType, 
    24252423                                                        field2[3], 
    24262424                                                        field2[4], 
    24272425                                                        field2[5], 
    24282426                                                        field2[6]); 
     2427                                else if(!strcmp(cRRType,"NAPTR")) 
     2428                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\t%s\t%s\n", 
     2429                                                        field2[0], 
     2430                                                        cTTL, 
     2431                                                        cRRType, 
     2432                                                        field2[3], 
     2433                                                        field2[4], 
     2434                                                        field2[5], 
     2435                                                        field2[6]); 
     2436                                else if(1) 
     2437                                        fprintf(zfp,"%s\t%s\t%s\t%s\t%s\n", 
     2438                                                        field2[0], 
     2439                                                        cTTL, 
     2440                                                        cRRType, 
     2441                                                        field2[3], 
     2442                                                        field2[4]); 
    24292443                        } 
    24302444                        else 
     2445                        { 
    24312446                                fprintf(zfp,"%s\t%s\t%s\t%s\n", 
    24322447                                                field2[0], 
    2433                                                 GetRRType(uRRType), 
     2448                                                cRRType, 
    24342449                                                field2[3], 
    24352450                                                field2[4]); 
     2451                        } 
    24362452                } 
    24372453                mysql_free_result(res2);