Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch ipv6-server Excluding Merge-Ins
This is equivalent to a diff from 5a12e8c3b6 to 2d9d276b7f
|
2015-04-10
| ||
| 00:23 | Add the ability (configurable) for "fossil rm" and "fossil mv" to actually remove and rename files on disk. check-in: 3c941ddc36 user: drh tags: trunk | |
|
2015-04-09
| ||
| 23:22 | Remove extraneous printf() statements from the IPv6 logic in the unix CGI server code. Leaf check-in: 2d9d276b7f user: drh tags: ipv6-server | |
| 23:16 | Fix indentation and remove all strcpy() and strcat() calls (as OpenBSD hates those). check-in: b1cb81ebe7 user: drh tags: ipv6-server | |
| 21:36 | Enable the use of IPv6 for "fossil ui" and "fossil server" on unix. check-in: dae37f0e35 user: drh tags: ipv6-server | |
| 02:19 | Merge updates from trunk. check-in: 0060d07ddf user: mistachkin tags: mvAndRmFiles | |
| 00:51 | Warn the client that pushes content which generates a fork on the server. check-in: 6b410f914e user: andybradford tags: sync-forkwarn | |
|
2015-04-08
| ||
| 17:05 | Improve some comments. No changes to code. check-in: 5a12e8c3b6 user: mistachkin tags: trunk | |
| 12:49 | Update the built-in SQLite to version 3.8.9. check-in: 15e669399f user: drh tags: trunk | |
Changes to src/cgi.c.
| ︙ | ︙ | |||
1716 1717 1718 1719 1720 1721 1722 | int listener = -1; /* The server socket */ int connection; /* A socket for each individual connection */ fd_set readfds; /* Set of file descriptors for select() */ socklen_t lenaddr; /* Length of the inaddr structure */ int child; /* PID of the child process */ int nchildren = 0; /* Number of child processes */ struct timeval delay; /* How long to wait inside select() */ | | | > > > | > | > > | | | > | | | | | > > | 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 |
int listener = -1; /* The server socket */
int connection; /* A socket for each individual connection */
fd_set readfds; /* Set of file descriptors for select() */
socklen_t lenaddr; /* Length of the inaddr structure */
int child; /* PID of the child process */
int nchildren = 0; /* Number of child processes */
struct timeval delay; /* How long to wait inside select() */
struct sockaddr_in6 inaddr; /* The socket address */
int optyes = 1; /* setsockopt flag */
int optno = 0; /* setsockopt flag */
int iPort = mnPort;
char ip[INET6_ADDRSTRLEN];
while( iPort<=mxPort ){
memset(&inaddr, 0, sizeof(inaddr));
inaddr.sin6_family = AF_INET6;
if( zIpAddr ){
/* check valid ipv6 address */
if (inet_pton(AF_INET6, zIpAddr, &(inaddr.sin6_addr)) < 1) {
/* maybe ipv4 string so try mixed ipv4 notation*/
sqlite3_snprintf(sizeof(ip), ip, "::FFFF:%s", zIpAddr);
if (inet_pton(AF_INET6, ip, &(inaddr.sin6_addr)) == -1){
fossil_fatal("not a valid IP address: %s", zIpAddr);
}
}
}else if( flags & HTTP_SERVER_LOCALHOST ){
inaddr.sin6_addr = in6addr_loopback;
}else{
inaddr.sin6_addr = in6addr_any;
}
inaddr.sin6_port = htons(iPort);
listener = socket(AF_INET6, SOCK_STREAM, 0);
if( listener<0 ){
iPort++;
continue;
}
/* if we can't terminate nicely, at least allow the socket to be reused */
setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &optyes, sizeof(optyes));
/* explicitly disable IPV6ONLY option for dualstack usage */
setsockopt(listener, IPPROTO_IPV6, IPV6_V6ONLY, &optno, sizeof(optno));
if( bind(listener, (struct sockaddr*)&inaddr, sizeof(inaddr))<0 ){
close(listener);
iPort++;
continue;
}
break;
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
2414 2415 2416 2417 2418 2419 2420 |
}
#else
zBrowser = db_get("web-browser", "open");
#endif
if( zIpAddr ){
zBrowserCmd = mprintf("%s http://%s:%%d/ &", zBrowser, zIpAddr);
}else{
| | | 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 |
}
#else
zBrowser = db_get("web-browser", "open");
#endif
if( zIpAddr ){
zBrowserCmd = mprintf("%s http://%s:%%d/ &", zBrowser, zIpAddr);
}else{
zBrowserCmd = mprintf("%s http://[::1]:%%d/ &", zBrowser);
}
if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY;
if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT;
}
db_close(1);
if( cgi_http_server(iPort, mxPort, zBrowserCmd, zIpAddr, flags) ){
fossil_fatal("unable to listen on TCP socket %d", iPort);
|
| ︙ | ︙ |