Fossil SCM
The client-side on a sync silently ignores unknown pragmas.
Commit
eb82de66377c770d0fe710110adc1be4a815b209
Parent
af66e2cf3a6c720…
1 file changed
+9
+9
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1627,10 +1627,19 @@ | ||
| 1627 | 1627 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1628 | 1628 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1629 | 1629 | defossilize(zMsg); |
| 1630 | 1630 | if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); |
| 1631 | 1631 | }else |
| 1632 | + | |
| 1633 | + /* pragma NAME VALUE... | |
| 1634 | + ** | |
| 1635 | + ** The server can send pragmas to try to convey meta-information to | |
| 1636 | + ** the client. These are informational only. Unknown pragmas are | |
| 1637 | + ** silently ignored. | |
| 1638 | + */ | |
| 1639 | + if( blob_eq(&xfer.aToken[0], "pragma") && xfer.nToken>=2 ){ | |
| 1640 | + }else | |
| 1632 | 1641 | |
| 1633 | 1642 | /* error MESSAGE |
| 1634 | 1643 | ** |
| 1635 | 1644 | ** Report an error and abandon the sync session. |
| 1636 | 1645 | ** |
| 1637 | 1646 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1627,10 +1627,19 @@ | |
| 1627 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1628 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1629 | defossilize(zMsg); |
| 1630 | if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); |
| 1631 | }else |
| 1632 | |
| 1633 | /* error MESSAGE |
| 1634 | ** |
| 1635 | ** Report an error and abandon the sync session. |
| 1636 | ** |
| 1637 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1627,10 +1627,19 @@ | |
| 1627 | if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ |
| 1628 | char *zMsg = blob_terminate(&xfer.aToken[1]); |
| 1629 | defossilize(zMsg); |
| 1630 | if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); |
| 1631 | }else |
| 1632 | |
| 1633 | /* pragma NAME VALUE... |
| 1634 | ** |
| 1635 | ** The server can send pragmas to try to convey meta-information to |
| 1636 | ** the client. These are informational only. Unknown pragmas are |
| 1637 | ** silently ignored. |
| 1638 | */ |
| 1639 | if( blob_eq(&xfer.aToken[0], "pragma") && xfer.nToken>=2 ){ |
| 1640 | }else |
| 1641 | |
| 1642 | /* error MESSAGE |
| 1643 | ** |
| 1644 | ** Report an error and abandon the sync session. |
| 1645 | ** |
| 1646 |