summaryrefslogtreecommitdiff
path: root/dpi
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-11-18 10:29:43 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-11-18 10:29:43 -0300
commit1b304002e49e51f342da29aa4dc2c709ed398694 (patch)
treee0208d6dcceb13a3a7787cec86ddfc6767dbab00 /dpi
parentdf9295e0123287f5ca13721e4a90d83fb62ba711 (diff)
Fixed bookmarks "cancel" link (Add/Mod URL, Add Sec). Also s/tmp_fd/sock_fd.
Diffstat (limited to 'dpi')
-rw-r--r--dpi/bookmarks.c14
-rw-r--r--dpi/cookies.c8
-rw-r--r--dpi/file.c14
3 files changed, 18 insertions, 18 deletions
diff --git a/dpi/bookmarks.c b/dpi/bookmarks.c
index 0119bc8e..bb0ab18e 100644
--- a/dpi/bookmarks.c
+++ b/dpi/bookmarks.c
@@ -254,7 +254,7 @@ DOCTYPE
" Modify bookmarks :: add section\n"
" </td>\n"
" <td align='right'>\n"
-" [<a href='dpi:/bm/modify'>cancel</a>]\n"
+" [<a href='dpi:/bm/'>cancel</a>]\n"
" </td>\n"
" </tr>\n"
" </table></td></tr>\n"
@@ -299,7 +299,7 @@ DOCTYPE
" <tr><td bgcolor='#b4b4b4'> Modify bookmarks :: update\n"
" </td>\n"
" <td align='right'>\n"
-" [<a href='dpi:/bm/modify'>cancel</a>]\n"
+" [<a href='dpi:/bm/'>cancel</a>]\n"
" </td>\n"
" </tr>\n"
" </table></td></tr>\n"
@@ -367,7 +367,7 @@ DOCTYPE
" <tr><td bgcolor='#b4b4b4'> Modify bookmarks :: add url\n"
" </td>\n"
" <td align='right'>\n"
-" [<a href='dpi:/bm/modify'>cancel</a>]\n"
+" [<a href='dpi:/bm/'>cancel</a>]\n"
" </td>\n"
" </tr>\n"
" </table></td></tr>\n"
@@ -1688,7 +1688,7 @@ static void termination_handler(int signum)
*/
int main(void) {
struct sockaddr_un spun;
- int tmp_fd, code;
+ int sock_fd, code;
socklen_t address_size;
char *tok;
Dsh *sh;
@@ -1717,14 +1717,14 @@ int main(void) {
MSG("(v.13): accepting connections...\n");
while (1) {
- tmp_fd = accept(STDIN_FILENO, (struct sockaddr *)&spun, &address_size);
- if (tmp_fd == -1) {
+ sock_fd = accept(STDIN_FILENO, (struct sockaddr *)&spun, &address_size);
+ if (sock_fd == -1) {
perror("[accept]");
exit(1);
}
/* create the Dsh structure */
- sh = a_Dpip_dsh_new(tmp_fd, tmp_fd, 8*1024);
+ sh = a_Dpip_dsh_new(sock_fd, sock_fd, 8*1024);
/* Authenticate our client... */
if (!(tok = a_Dpip_dsh_read_token(sh, 1)) ||
diff --git a/dpi/cookies.c b/dpi/cookies.c
index 3cd3237c..cf0cecf0 100644
--- a/dpi/cookies.c
+++ b/dpi/cookies.c
@@ -1443,7 +1443,7 @@ int main(void) {
struct sockaddr_in sin;
socklen_t address_size;
ClientInfo *client;
- int tmp_fd,code;
+ int sock_fd, code;
char *buf;
Dsh *sh;
@@ -1468,14 +1468,14 @@ int main(void) {
address_size = sizeof(struct sockaddr_in);
while (1) {
- tmp_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &address_size);
- if (tmp_fd == -1) {
+ sock_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &address_size);
+ if (sock_fd == -1) {
perror("[accept]");
exit(1);
}
/* create the Dsh structure */
- sh = a_Dpip_dsh_new(tmp_fd, tmp_fd, 8*1024);
+ sh = a_Dpip_dsh_new(sock_fd, sock_fd, 8*1024);
client = dNew(ClientInfo,1);
client->sh = sh;
client->status = 0;
diff --git a/dpi/file.c b/dpi/file.c
index 61f25865..94cd860c 100644
--- a/dpi/file.c
+++ b/dpi/file.c
@@ -1046,7 +1046,7 @@ int main(void)
{
struct sockaddr_in sin;
socklen_t sin_sz;
- int tmp_fd, c_st, st = 1;
+ int sock_fd, c_st, st = 1;
/* Arrange the cleanup function for abnormal terminations */
if (signal (SIGINT, termination_handler) == SIG_IGN)
@@ -1089,19 +1089,19 @@ int main(void)
if (FD_ISSET(STDIN_FILENO, &read_set)) {
/* accept the incoming connection */
do {
- tmp_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &sin_sz);
- } while (tmp_fd < 0 && errno == EINTR);
- if (tmp_fd == -1) {
+ sock_fd = accept(STDIN_FILENO, (struct sockaddr *)&sin, &sin_sz);
+ } while (sock_fd < 0 && errno == EINTR);
+ if (sock_fd == -1) {
if (errno == EAGAIN)
continue;
MSG(" accept() %s\n", dStrerror(errno));
break;
} else {
- _MSG(" accept() fd=%d\n", tmp_fd);
+ _MSG(" accept() fd=%d\n", sock_fd);
/* Set nonblocking */
- fcntl(tmp_fd, F_SETFL, O_NONBLOCK | fcntl(tmp_fd, F_GETFL));
+ fcntl(sock_fd, F_SETFL, O_NONBLOCK | fcntl(sock_fd, F_GETFL));
/* Create and initialize a new client */
- File_add_client(tmp_fd);
+ File_add_client(sock_fd);
}
continue;
}