Fossil SCM
Remove support for the legacy configuration sync transfer format, that was replaced in 2011.
Commit
2ed7c1123d055eafff9260c028ee32a9eb4df4ecbf09f932b13470c32723fb3f
Parent
a3e50c99f343eb6…
2 files changed
+12
-53
+1
-22
+12
-53
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -39,11 +39,10 @@ | ||
| 39 | 39 | #define CONFIGSET_XFER 0x000080 /* Transfer configuration */ |
| 40 | 40 | |
| 41 | 41 | #define CONFIGSET_ALL 0x0000ff /* Everything */ |
| 42 | 42 | |
| 43 | 43 | #define CONFIGSET_OVERWRITE 0x100000 /* Causes overwrite instead of merge */ |
| 44 | -#define CONFIGSET_OLDFORMAT 0x200000 /* Use the legacy format */ | |
| 45 | 44 | |
| 46 | 45 | /* |
| 47 | 46 | ** This mask is used for the common TH1 configuration settings (i.e. those |
| 48 | 47 | ** that are not specific to one particular subsystem, such as the transfer |
| 49 | 48 | ** subsystem). |
| @@ -170,29 +169,19 @@ | ||
| 170 | 169 | const char *configure_first_name(int iMask){ |
| 171 | 170 | iConfig = 0; |
| 172 | 171 | return configure_next_name(iMask); |
| 173 | 172 | } |
| 174 | 173 | const char *configure_next_name(int iMask){ |
| 175 | - if( iMask & CONFIGSET_OLDFORMAT ){ | |
| 176 | - while( iConfig<count(aConfig) ){ | |
| 177 | - if( aConfig[iConfig].groupMask & iMask ){ | |
| 178 | - return aConfig[iConfig++].zName; | |
| 179 | - }else{ | |
| 180 | - iConfig++; | |
| 181 | - } | |
| 182 | - } | |
| 183 | - }else{ | |
| 184 | - if( iConfig==0 && (iMask & CONFIGSET_ALL)==CONFIGSET_ALL ){ | |
| 185 | - iConfig = count(aGroupName); | |
| 186 | - return "/all"; | |
| 187 | - } | |
| 188 | - while( iConfig<count(aGroupName)-1 ){ | |
| 189 | - if( aGroupName[iConfig].groupMask & iMask ){ | |
| 190 | - return aGroupName[iConfig++].zName; | |
| 191 | - }else{ | |
| 192 | - iConfig++; | |
| 193 | - } | |
| 174 | + if( iConfig==0 && (iMask & CONFIGSET_ALL)==CONFIGSET_ALL ){ | |
| 175 | + iConfig = count(aGroupName); | |
| 176 | + return "/all"; | |
| 177 | + } | |
| 178 | + while( iConfig<count(aGroupName)-1 ){ | |
| 179 | + if( aGroupName[iConfig].groupMask & iMask ){ | |
| 180 | + return aGroupName[iConfig++].zName; | |
| 181 | + }else{ | |
| 182 | + iConfig++; | |
| 194 | 183 | } |
| 195 | 184 | } |
| 196 | 185 | return 0; |
| 197 | 186 | } |
| 198 | 187 | |
| @@ -514,10 +503,11 @@ | ||
| 514 | 503 | ** OLD FORMAT: |
| 515 | 504 | ** |
| 516 | 505 | ** The old format is retained for backwards compatibility, but is deprecated. |
| 517 | 506 | ** The cutover from old format to new was on 2011-04-25. After sufficient |
| 518 | 507 | ** time has passed, support for the old format will be removed. |
| 508 | +** Update: Support for the old format was remoed on 2017-09-20. | |
| 519 | 509 | ** |
| 520 | 510 | ** zName is either the NAME of an element of the CONFIG table, or else |
| 521 | 511 | ** one of the special names "@shun", "@reportfmt", "@user", or "@concealed". |
| 522 | 512 | ** If zName is a CONFIG table name, then CONTENT replaces (overwrites) the |
| 523 | 513 | ** element in the CONFIG table. For one of the @-labels, CONTENT is raw |
| @@ -609,35 +599,10 @@ | ||
| 609 | 599 | azToken[0]/*safe-for-%s*/); |
| 610 | 600 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 611 | 601 | } |
| 612 | 602 | blob_reset(&sql); |
| 613 | 603 | rebuildMask |= thisMask; |
| 614 | - }else{ | |
| 615 | - /* Otherwise, the old format */ | |
| 616 | - if( (configure_is_exportable(zName) & groupMask)==0 ) return; | |
| 617 | - if( fossil_strcmp(zName, "logo-image")==0 ){ | |
| 618 | - Stmt ins; | |
| 619 | - db_prepare(&ins, | |
| 620 | - "REPLACE INTO config(name, value, mtime) VALUES(:name, :value, now())" | |
| 621 | - ); | |
| 622 | - db_bind_text(&ins, ":name", zName); | |
| 623 | - db_bind_blob(&ins, ":value", pContent); | |
| 624 | - db_step(&ins); | |
| 625 | - db_finalize(&ins); | |
| 626 | - }else if( zName[0]=='@' ){ | |
| 627 | - /* Notice that we are evaluating arbitrary SQL received from the | |
| 628 | - ** client. But this can only happen if the client has authenticated | |
| 629 | - ** as an administrator, so presumably we trust the client at this | |
| 630 | - ** point. | |
| 631 | - */ | |
| 632 | - db_multi_exec("%s", blob_str(pContent) /*safe-for-%s*/); | |
| 633 | - }else{ | |
| 634 | - db_multi_exec( | |
| 635 | - "REPLACE INTO config(name,value,mtime) VALUES(%Q,%Q,now())", | |
| 636 | - zName, blob_str(pContent) | |
| 637 | - ); | |
| 638 | - } | |
| 639 | 604 | } |
| 640 | 605 | } |
| 641 | 606 | |
| 642 | 607 | /* |
| 643 | 608 | ** Process a file full of "config" cards. |
| @@ -856,22 +821,19 @@ | ||
| 856 | 821 | ** |
| 857 | 822 | ** %fossil configuration pull AREA ?URL? |
| 858 | 823 | ** |
| 859 | 824 | ** Pull and install the configuration from a different server |
| 860 | 825 | ** identified by URL. If no URL is specified, then the default |
| 861 | -** server is used. Use the --legacy option for the older protocol | |
| 862 | -** (when talking to servers compiled prior to 2011-04-27.) Use | |
| 863 | -** the --overwrite flag to completely replace local settings with | |
| 864 | -** content received from URL. | |
| 826 | +** server is used. Use the --overwrite flag to completely | |
| 827 | +** replace local settings with content received from URL. | |
| 865 | 828 | ** |
| 866 | 829 | ** %fossil configuration push AREA ?URL? |
| 867 | 830 | ** |
| 868 | 831 | ** Push the local configuration into the remote server identified |
| 869 | 832 | ** by URL. Admin privilege is required on the remote server for |
| 870 | 833 | ** this to work. When the same record exists both locally and on |
| 871 | 834 | ** the remote end, the one that was most recently changed wins. |
| 872 | -** Use the --legacy flag when talking to older servers. | |
| 873 | 835 | ** |
| 874 | 836 | ** %fossil configuration reset AREA |
| 875 | 837 | ** |
| 876 | 838 | ** Restore the configuration to the default. AREA as above. |
| 877 | 839 | ** |
| @@ -932,14 +894,12 @@ | ||
| 932 | 894 | || strncmp(zMethod, "push", n)==0 |
| 933 | 895 | || strncmp(zMethod, "sync", n)==0 |
| 934 | 896 | ){ |
| 935 | 897 | int mask; |
| 936 | 898 | const char *zServer = 0; |
| 937 | - int legacyFlag = 0; | |
| 938 | 899 | int overwriteFlag = 0; |
| 939 | 900 | |
| 940 | - if( zMethod[0]!='s' ) legacyFlag = find_option("legacy",0,0)!=0; | |
| 941 | 901 | if( strncmp(zMethod,"pull",n)==0 ){ |
| 942 | 902 | overwriteFlag = find_option("overwrite",0,0)!=0; |
| 943 | 903 | } |
| 944 | 904 | url_proxy_options(); |
| 945 | 905 | if( g.argc!=4 && g.argc!=5 ){ |
| @@ -951,11 +911,10 @@ | ||
| 951 | 911 | } |
| 952 | 912 | url_parse(zServer, URL_PROMPT_PW); |
| 953 | 913 | if( g.url.protocol==0 ) fossil_fatal("no server URL specified"); |
| 954 | 914 | user_select(); |
| 955 | 915 | url_enable_proxy("via proxy: "); |
| 956 | - if( legacyFlag ) mask |= CONFIGSET_OLDFORMAT; | |
| 957 | 916 | if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE; |
| 958 | 917 | if( strncmp(zMethod, "push", n)==0 ){ |
| 959 | 918 | client_sync(0,0,(unsigned)mask); |
| 960 | 919 | }else if( strncmp(zMethod, "pull", n)==0 ){ |
| 961 | 920 | client_sync(0,(unsigned)mask,0); |
| 962 | 921 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -39,11 +39,10 @@ | |
| 39 | #define CONFIGSET_XFER 0x000080 /* Transfer configuration */ |
| 40 | |
| 41 | #define CONFIGSET_ALL 0x0000ff /* Everything */ |
| 42 | |
| 43 | #define CONFIGSET_OVERWRITE 0x100000 /* Causes overwrite instead of merge */ |
| 44 | #define CONFIGSET_OLDFORMAT 0x200000 /* Use the legacy format */ |
| 45 | |
| 46 | /* |
| 47 | ** This mask is used for the common TH1 configuration settings (i.e. those |
| 48 | ** that are not specific to one particular subsystem, such as the transfer |
| 49 | ** subsystem). |
| @@ -170,29 +169,19 @@ | |
| 170 | const char *configure_first_name(int iMask){ |
| 171 | iConfig = 0; |
| 172 | return configure_next_name(iMask); |
| 173 | } |
| 174 | const char *configure_next_name(int iMask){ |
| 175 | if( iMask & CONFIGSET_OLDFORMAT ){ |
| 176 | while( iConfig<count(aConfig) ){ |
| 177 | if( aConfig[iConfig].groupMask & iMask ){ |
| 178 | return aConfig[iConfig++].zName; |
| 179 | }else{ |
| 180 | iConfig++; |
| 181 | } |
| 182 | } |
| 183 | }else{ |
| 184 | if( iConfig==0 && (iMask & CONFIGSET_ALL)==CONFIGSET_ALL ){ |
| 185 | iConfig = count(aGroupName); |
| 186 | return "/all"; |
| 187 | } |
| 188 | while( iConfig<count(aGroupName)-1 ){ |
| 189 | if( aGroupName[iConfig].groupMask & iMask ){ |
| 190 | return aGroupName[iConfig++].zName; |
| 191 | }else{ |
| 192 | iConfig++; |
| 193 | } |
| 194 | } |
| 195 | } |
| 196 | return 0; |
| 197 | } |
| 198 | |
| @@ -514,10 +503,11 @@ | |
| 514 | ** OLD FORMAT: |
| 515 | ** |
| 516 | ** The old format is retained for backwards compatibility, but is deprecated. |
| 517 | ** The cutover from old format to new was on 2011-04-25. After sufficient |
| 518 | ** time has passed, support for the old format will be removed. |
| 519 | ** |
| 520 | ** zName is either the NAME of an element of the CONFIG table, or else |
| 521 | ** one of the special names "@shun", "@reportfmt", "@user", or "@concealed". |
| 522 | ** If zName is a CONFIG table name, then CONTENT replaces (overwrites) the |
| 523 | ** element in the CONFIG table. For one of the @-labels, CONTENT is raw |
| @@ -609,35 +599,10 @@ | |
| 609 | azToken[0]/*safe-for-%s*/); |
| 610 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 611 | } |
| 612 | blob_reset(&sql); |
| 613 | rebuildMask |= thisMask; |
| 614 | }else{ |
| 615 | /* Otherwise, the old format */ |
| 616 | if( (configure_is_exportable(zName) & groupMask)==0 ) return; |
| 617 | if( fossil_strcmp(zName, "logo-image")==0 ){ |
| 618 | Stmt ins; |
| 619 | db_prepare(&ins, |
| 620 | "REPLACE INTO config(name, value, mtime) VALUES(:name, :value, now())" |
| 621 | ); |
| 622 | db_bind_text(&ins, ":name", zName); |
| 623 | db_bind_blob(&ins, ":value", pContent); |
| 624 | db_step(&ins); |
| 625 | db_finalize(&ins); |
| 626 | }else if( zName[0]=='@' ){ |
| 627 | /* Notice that we are evaluating arbitrary SQL received from the |
| 628 | ** client. But this can only happen if the client has authenticated |
| 629 | ** as an administrator, so presumably we trust the client at this |
| 630 | ** point. |
| 631 | */ |
| 632 | db_multi_exec("%s", blob_str(pContent) /*safe-for-%s*/); |
| 633 | }else{ |
| 634 | db_multi_exec( |
| 635 | "REPLACE INTO config(name,value,mtime) VALUES(%Q,%Q,now())", |
| 636 | zName, blob_str(pContent) |
| 637 | ); |
| 638 | } |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | /* |
| 643 | ** Process a file full of "config" cards. |
| @@ -856,22 +821,19 @@ | |
| 856 | ** |
| 857 | ** %fossil configuration pull AREA ?URL? |
| 858 | ** |
| 859 | ** Pull and install the configuration from a different server |
| 860 | ** identified by URL. If no URL is specified, then the default |
| 861 | ** server is used. Use the --legacy option for the older protocol |
| 862 | ** (when talking to servers compiled prior to 2011-04-27.) Use |
| 863 | ** the --overwrite flag to completely replace local settings with |
| 864 | ** content received from URL. |
| 865 | ** |
| 866 | ** %fossil configuration push AREA ?URL? |
| 867 | ** |
| 868 | ** Push the local configuration into the remote server identified |
| 869 | ** by URL. Admin privilege is required on the remote server for |
| 870 | ** this to work. When the same record exists both locally and on |
| 871 | ** the remote end, the one that was most recently changed wins. |
| 872 | ** Use the --legacy flag when talking to older servers. |
| 873 | ** |
| 874 | ** %fossil configuration reset AREA |
| 875 | ** |
| 876 | ** Restore the configuration to the default. AREA as above. |
| 877 | ** |
| @@ -932,14 +894,12 @@ | |
| 932 | || strncmp(zMethod, "push", n)==0 |
| 933 | || strncmp(zMethod, "sync", n)==0 |
| 934 | ){ |
| 935 | int mask; |
| 936 | const char *zServer = 0; |
| 937 | int legacyFlag = 0; |
| 938 | int overwriteFlag = 0; |
| 939 | |
| 940 | if( zMethod[0]!='s' ) legacyFlag = find_option("legacy",0,0)!=0; |
| 941 | if( strncmp(zMethod,"pull",n)==0 ){ |
| 942 | overwriteFlag = find_option("overwrite",0,0)!=0; |
| 943 | } |
| 944 | url_proxy_options(); |
| 945 | if( g.argc!=4 && g.argc!=5 ){ |
| @@ -951,11 +911,10 @@ | |
| 951 | } |
| 952 | url_parse(zServer, URL_PROMPT_PW); |
| 953 | if( g.url.protocol==0 ) fossil_fatal("no server URL specified"); |
| 954 | user_select(); |
| 955 | url_enable_proxy("via proxy: "); |
| 956 | if( legacyFlag ) mask |= CONFIGSET_OLDFORMAT; |
| 957 | if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE; |
| 958 | if( strncmp(zMethod, "push", n)==0 ){ |
| 959 | client_sync(0,0,(unsigned)mask); |
| 960 | }else if( strncmp(zMethod, "pull", n)==0 ){ |
| 961 | client_sync(0,(unsigned)mask,0); |
| 962 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -39,11 +39,10 @@ | |
| 39 | #define CONFIGSET_XFER 0x000080 /* Transfer configuration */ |
| 40 | |
| 41 | #define CONFIGSET_ALL 0x0000ff /* Everything */ |
| 42 | |
| 43 | #define CONFIGSET_OVERWRITE 0x100000 /* Causes overwrite instead of merge */ |
| 44 | |
| 45 | /* |
| 46 | ** This mask is used for the common TH1 configuration settings (i.e. those |
| 47 | ** that are not specific to one particular subsystem, such as the transfer |
| 48 | ** subsystem). |
| @@ -170,29 +169,19 @@ | |
| 169 | const char *configure_first_name(int iMask){ |
| 170 | iConfig = 0; |
| 171 | return configure_next_name(iMask); |
| 172 | } |
| 173 | const char *configure_next_name(int iMask){ |
| 174 | if( iConfig==0 && (iMask & CONFIGSET_ALL)==CONFIGSET_ALL ){ |
| 175 | iConfig = count(aGroupName); |
| 176 | return "/all"; |
| 177 | } |
| 178 | while( iConfig<count(aGroupName)-1 ){ |
| 179 | if( aGroupName[iConfig].groupMask & iMask ){ |
| 180 | return aGroupName[iConfig++].zName; |
| 181 | }else{ |
| 182 | iConfig++; |
| 183 | } |
| 184 | } |
| 185 | return 0; |
| 186 | } |
| 187 | |
| @@ -514,10 +503,11 @@ | |
| 503 | ** OLD FORMAT: |
| 504 | ** |
| 505 | ** The old format is retained for backwards compatibility, but is deprecated. |
| 506 | ** The cutover from old format to new was on 2011-04-25. After sufficient |
| 507 | ** time has passed, support for the old format will be removed. |
| 508 | ** Update: Support for the old format was remoed on 2017-09-20. |
| 509 | ** |
| 510 | ** zName is either the NAME of an element of the CONFIG table, or else |
| 511 | ** one of the special names "@shun", "@reportfmt", "@user", or "@concealed". |
| 512 | ** If zName is a CONFIG table name, then CONTENT replaces (overwrites) the |
| 513 | ** element in the CONFIG table. For one of the @-labels, CONTENT is raw |
| @@ -609,35 +599,10 @@ | |
| 599 | azToken[0]/*safe-for-%s*/); |
| 600 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 601 | } |
| 602 | blob_reset(&sql); |
| 603 | rebuildMask |= thisMask; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | /* |
| 608 | ** Process a file full of "config" cards. |
| @@ -856,22 +821,19 @@ | |
| 821 | ** |
| 822 | ** %fossil configuration pull AREA ?URL? |
| 823 | ** |
| 824 | ** Pull and install the configuration from a different server |
| 825 | ** identified by URL. If no URL is specified, then the default |
| 826 | ** server is used. Use the --overwrite flag to completely |
| 827 | ** replace local settings with content received from URL. |
| 828 | ** |
| 829 | ** %fossil configuration push AREA ?URL? |
| 830 | ** |
| 831 | ** Push the local configuration into the remote server identified |
| 832 | ** by URL. Admin privilege is required on the remote server for |
| 833 | ** this to work. When the same record exists both locally and on |
| 834 | ** the remote end, the one that was most recently changed wins. |
| 835 | ** |
| 836 | ** %fossil configuration reset AREA |
| 837 | ** |
| 838 | ** Restore the configuration to the default. AREA as above. |
| 839 | ** |
| @@ -932,14 +894,12 @@ | |
| 894 | || strncmp(zMethod, "push", n)==0 |
| 895 | || strncmp(zMethod, "sync", n)==0 |
| 896 | ){ |
| 897 | int mask; |
| 898 | const char *zServer = 0; |
| 899 | int overwriteFlag = 0; |
| 900 | |
| 901 | if( strncmp(zMethod,"pull",n)==0 ){ |
| 902 | overwriteFlag = find_option("overwrite",0,0)!=0; |
| 903 | } |
| 904 | url_proxy_options(); |
| 905 | if( g.argc!=4 && g.argc!=5 ){ |
| @@ -951,11 +911,10 @@ | |
| 911 | } |
| 912 | url_parse(zServer, URL_PROMPT_PW); |
| 913 | if( g.url.protocol==0 ) fossil_fatal("no server URL specified"); |
| 914 | user_select(); |
| 915 | url_enable_proxy("via proxy: "); |
| 916 | if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE; |
| 917 | if( strncmp(zMethod, "push", n)==0 ){ |
| 918 | client_sync(0,0,(unsigned)mask); |
| 919 | }else if( strncmp(zMethod, "pull", n)==0 ){ |
| 920 | client_sync(0,(unsigned)mask,0); |
| 921 |
+1
-22
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1884,16 +1884,10 @@ | ||
| 1884 | 1884 | while( zName ){ |
| 1885 | 1885 | blob_appendf(&send, "reqconfig %s\n", zName); |
| 1886 | 1886 | zName = configure_next_name(configRcvMask); |
| 1887 | 1887 | nCardSent++; |
| 1888 | 1888 | } |
| 1889 | - if( (configRcvMask & (CONFIGSET_USER|CONFIGSET_TKT))!=0 | |
| 1890 | - && (configRcvMask & CONFIGSET_OLDFORMAT)!=0 | |
| 1891 | - ){ | |
| 1892 | - int overwrite = (configRcvMask & CONFIGSET_OVERWRITE)!=0; | |
| 1893 | - configure_prepare_to_receive(overwrite); | |
| 1894 | - } | |
| 1895 | 1889 | origConfigRcvMask = configRcvMask; |
| 1896 | 1890 | configRcvMask = 0; |
| 1897 | 1891 | } |
| 1898 | 1892 | |
| 1899 | 1893 | /* Send a request to sync unversioned files. On a clone, delay sending |
| @@ -1910,21 +1904,11 @@ | ||
| 1910 | 1904 | } |
| 1911 | 1905 | |
| 1912 | 1906 | /* Send configuration parameters being pushed */ |
| 1913 | 1907 | if( configSendMask ){ |
| 1914 | 1908 | if( zOpType==0 ) zOpType = "Push"; |
| 1915 | - if( configSendMask & CONFIGSET_OLDFORMAT ){ | |
| 1916 | - const char *zName; | |
| 1917 | - zName = configure_first_name(configSendMask); | |
| 1918 | - while( zName ){ | |
| 1919 | - send_legacy_config_card(&xfer, zName); | |
| 1920 | - zName = configure_next_name(configSendMask); | |
| 1921 | - nCardSent++; | |
| 1922 | - } | |
| 1923 | - }else{ | |
| 1924 | - nCardSent += configure_send_group(xfer.pOut, configSendMask, 0); | |
| 1925 | - } | |
| 1909 | + nCardSent += configure_send_group(xfer.pOut, configSendMask, 0); | |
| 1926 | 1910 | configSendMask = 0; |
| 1927 | 1911 | } |
| 1928 | 1912 | |
| 1929 | 1913 | /* Send unversioned files present here on the client but missing or |
| 1930 | 1914 | ** obsolete on the server. |
| @@ -2386,15 +2370,10 @@ | ||
| 2386 | 2370 | break; |
| 2387 | 2371 | } |
| 2388 | 2372 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 2389 | 2373 | blob_reset(&xfer.line); |
| 2390 | 2374 | } |
| 2391 | - if( (configRcvMask & (CONFIGSET_USER|CONFIGSET_TKT))!=0 | |
| 2392 | - && (configRcvMask & CONFIGSET_OLDFORMAT)!=0 | |
| 2393 | - ){ | |
| 2394 | - configure_finalize_receive(); | |
| 2395 | - } | |
| 2396 | 2375 | origConfigRcvMask = 0; |
| 2397 | 2376 | if( nCardRcvd>0 && (syncFlags & SYNC_VERBOSE) ){ |
| 2398 | 2377 | fossil_print(zValueFormat /*works-like:"%s%d%d%d%d"*/, "Received:", |
| 2399 | 2378 | blob_size(&recv), nCardRcvd, |
| 2400 | 2379 | xfer.nFileRcvd, xfer.nDeltaRcvd + xfer.nDanglingFile); |
| 2401 | 2380 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1884,16 +1884,10 @@ | |
| 1884 | while( zName ){ |
| 1885 | blob_appendf(&send, "reqconfig %s\n", zName); |
| 1886 | zName = configure_next_name(configRcvMask); |
| 1887 | nCardSent++; |
| 1888 | } |
| 1889 | if( (configRcvMask & (CONFIGSET_USER|CONFIGSET_TKT))!=0 |
| 1890 | && (configRcvMask & CONFIGSET_OLDFORMAT)!=0 |
| 1891 | ){ |
| 1892 | int overwrite = (configRcvMask & CONFIGSET_OVERWRITE)!=0; |
| 1893 | configure_prepare_to_receive(overwrite); |
| 1894 | } |
| 1895 | origConfigRcvMask = configRcvMask; |
| 1896 | configRcvMask = 0; |
| 1897 | } |
| 1898 | |
| 1899 | /* Send a request to sync unversioned files. On a clone, delay sending |
| @@ -1910,21 +1904,11 @@ | |
| 1910 | } |
| 1911 | |
| 1912 | /* Send configuration parameters being pushed */ |
| 1913 | if( configSendMask ){ |
| 1914 | if( zOpType==0 ) zOpType = "Push"; |
| 1915 | if( configSendMask & CONFIGSET_OLDFORMAT ){ |
| 1916 | const char *zName; |
| 1917 | zName = configure_first_name(configSendMask); |
| 1918 | while( zName ){ |
| 1919 | send_legacy_config_card(&xfer, zName); |
| 1920 | zName = configure_next_name(configSendMask); |
| 1921 | nCardSent++; |
| 1922 | } |
| 1923 | }else{ |
| 1924 | nCardSent += configure_send_group(xfer.pOut, configSendMask, 0); |
| 1925 | } |
| 1926 | configSendMask = 0; |
| 1927 | } |
| 1928 | |
| 1929 | /* Send unversioned files present here on the client but missing or |
| 1930 | ** obsolete on the server. |
| @@ -2386,15 +2370,10 @@ | |
| 2386 | break; |
| 2387 | } |
| 2388 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 2389 | blob_reset(&xfer.line); |
| 2390 | } |
| 2391 | if( (configRcvMask & (CONFIGSET_USER|CONFIGSET_TKT))!=0 |
| 2392 | && (configRcvMask & CONFIGSET_OLDFORMAT)!=0 |
| 2393 | ){ |
| 2394 | configure_finalize_receive(); |
| 2395 | } |
| 2396 | origConfigRcvMask = 0; |
| 2397 | if( nCardRcvd>0 && (syncFlags & SYNC_VERBOSE) ){ |
| 2398 | fossil_print(zValueFormat /*works-like:"%s%d%d%d%d"*/, "Received:", |
| 2399 | blob_size(&recv), nCardRcvd, |
| 2400 | xfer.nFileRcvd, xfer.nDeltaRcvd + xfer.nDanglingFile); |
| 2401 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1884,16 +1884,10 @@ | |
| 1884 | while( zName ){ |
| 1885 | blob_appendf(&send, "reqconfig %s\n", zName); |
| 1886 | zName = configure_next_name(configRcvMask); |
| 1887 | nCardSent++; |
| 1888 | } |
| 1889 | origConfigRcvMask = configRcvMask; |
| 1890 | configRcvMask = 0; |
| 1891 | } |
| 1892 | |
| 1893 | /* Send a request to sync unversioned files. On a clone, delay sending |
| @@ -1910,21 +1904,11 @@ | |
| 1904 | } |
| 1905 | |
| 1906 | /* Send configuration parameters being pushed */ |
| 1907 | if( configSendMask ){ |
| 1908 | if( zOpType==0 ) zOpType = "Push"; |
| 1909 | nCardSent += configure_send_group(xfer.pOut, configSendMask, 0); |
| 1910 | configSendMask = 0; |
| 1911 | } |
| 1912 | |
| 1913 | /* Send unversioned files present here on the client but missing or |
| 1914 | ** obsolete on the server. |
| @@ -2386,15 +2370,10 @@ | |
| 2370 | break; |
| 2371 | } |
| 2372 | blobarray_reset(xfer.aToken, xfer.nToken); |
| 2373 | blob_reset(&xfer.line); |
| 2374 | } |
| 2375 | origConfigRcvMask = 0; |
| 2376 | if( nCardRcvd>0 && (syncFlags & SYNC_VERBOSE) ){ |
| 2377 | fossil_print(zValueFormat /*works-like:"%s%d%d%d%d"*/, "Received:", |
| 2378 | blob_size(&recv), nCardRcvd, |
| 2379 | xfer.nFileRcvd, xfer.nDeltaRcvd + xfer.nDanglingFile); |
| 2380 |