Mercurial > dillo_port1.3
changeset 10:f30c923e31aa
Fixed a problem with locally-installed dpis.
author | jcid |
---|---|
date | Sun, 14 Oct 2007 02:09:40 +0200 |
parents | d8dcfe0e7648 |
children | 4a5942beffdf |
files | ChangeLog dpid/dpi_socket_dir.c dpid/dpid.c |
diffstat | 3 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Oct 13 20:22:23 2007 +0200 +++ b/ChangeLog Sun Oct 14 02:09:40 2007 +0200 @@ -37,6 +37,8 @@ - Improved notification upon leaving links. - Implemented image-link URL showing in status bar. Patches: place ++- Fixed a problem with locally-installed dpis. + Patch: place, Jorge Arellano +- Fixed a va_list-related SEGFAULT on 64bit-arch in dStr_vsprintfa(). Patch: Vincent Thomasset +- Fixed void to int conversions for 64bit-arch.
--- a/dpid/dpi_socket_dir.c Sat Oct 13 20:22:23 2007 +0200 +++ b/dpid/dpi_socket_dir.c Sun Oct 14 02:09:40 2007 +0200 @@ -21,6 +21,7 @@ */ #include <errno.h> +#include <stdlib.h> #include "dpid_common.h" #include "dpi.h" #include "misc_new.h" @@ -76,9 +77,10 @@ */ char *mk_sockdir(void) { - char *template; + char *template, *logname; - template = dStrconcat("/tmp/", getlogin(), "-", "XXXXXX", NULL); + logname = getenv("LOGNAME") ? getenv("LOGNAME") : "joe"; + template = dStrconcat("/tmp/", logname, "-", "XXXXXX", NULL); if (a_Misc_mkdtemp(template) == NULL) { ERRMSG("mk_sockdir", "a_Misc_mkdtemp", 0); MSG_ERR(" - %s\n", template);
--- a/dpid/dpid.c Sat Oct 13 20:22:23 2007 +0200 +++ b/dpid/dpid.c Sun Oct 14 02:09:40 2007 +0200 @@ -228,7 +228,7 @@ } else if ((dir_stream = opendir(service_dir)) == NULL) { ERRMSG("get_dpi_attr", "opendir", errno); } else { - /* Scan the directory loking for dpi files. + /* Scan the directory looking for dpi files. * (currently there's only the dpi program, but in the future * there may also be helper scripts.) */ while ( (dir_entry = readdir(dir_stream)) != NULL) { @@ -330,7 +330,6 @@ { DIR *user_dir_stream, *sys_dir_stream; char *user_dpidir = NULL, *sys_dpidir = NULL, *dpidrc = NULL; - char *basename=NULL; struct dirent *user_dirent, *sys_dirent; int j, st, not_in_user_list; int snum, usr_srv_num; @@ -387,8 +386,7 @@ continue; not_in_user_list = 1; for (j = 0; j < usr_srv_num; j++) { - basename = get_basename((*attlist)[j].path); - if (strcmp(sys_dirent->d_name, basename) == 0) { + if (strcmp(sys_dirent->d_name, (*attlist)[j].id) == 0) { not_in_user_list = 0; break; }