* considering it was developed without i18n support under Windows */
#define DCCHARSET "windows-1252"
-#ifdef DCPP_MASQUERADE
-/*
- * I honestly don't want to pretend being a client that I'm not, but
- * there are so many hubs that simply do not accept any clients
- * outside their whitelists, for no obvious reasons, so I feel that I
- * am left with little choice. Anyhow, as long as I actually support
- * all the features that my faked DC++ version does, there should be
- * very little harm done.
- */
-#define DCIDTAG "++"
-#define DCIDTAGV "0.674"
-#define DCIDFULL "DC++ 0.674"
-#else
-#define DCIDTAG "Dolda"
-#define DCIDTAGV VERSION
-#define DCIDFULL "DoldaConnect " VERSION
-#endif
-
#define PEER_CMD 0
#define PEER_STOP 1
#define PEER_TRNS 2
free(newbuf);
p = hub->inbuf;
hub->inbufdata += datalen;
- while((datalen > 0) && ((p2 = memchr(p, '|', datalen)) != NULL))
+ while((p - hub->inbuf < hub->inbufdata) && ((p2 = memchr(p, '|', hub->inbufdata - (p - hub->inbuf))) != NULL))
{
*(p2++) = 0;
for(cmd = hubcmds; cmd->handler != NULL; cmd++)
}
if((cmd->limit == 0) || (hub->queue.size < cmd->limit))
newqcmd(&hub->queue, p);
- datalen -= p2 - p;
p = p2;
}
memmove(hub->inbuf, p, hub->inbufdata -= p - hub->inbuf);
int forkfilter(struct transfer *transfer)
{
- char *filtername, *filename, *peerid, *buf;
+ char *filtername, *filename, *peerid, *buf, *p;
wchar_t *wfilename;
struct passwd *pwent;
pid_t pid;
peerid = sprintf2("utf8-%s", buf);
free(buf);
}
+ for(p = filename; *p; p++) {
+ if(*p == '/')
+ *p = '_';
+ else if((p == filename) && (*p == '.'))
+ *p = '_';
+ }
if((pid = forksess(transfer->owner, transfer->auth, filterexit, NULL, FD_PIPE, 0, O_WRONLY, &inpipe, FD_PIPE, 1, O_RDONLY, &outpipe, FD_FILE, 2, O_RDWR, "/dev/null", FD_END)) < 0)
{
flog(LOG_WARNING, "could not fork session for filter for transfer %i: %s", transfer->id, strerror(errno));
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
-.TH HUBMGR 1 "2007-11-18" "" "Dolda Connect manual"
+.TH HUBMGR 1 "2008-03-03" "" "Dolda Connect manual"
.SH NAME
hubmgr \- Automatic hub manager for Dolda Connect
.SH SYNOPSIS
on the name \fBhubmgr\fP and exit if it receives a message with the
first token being \fBexit\fP. Upon exit, it will disconnect all
managed hubs.
+.P
+\fBhubmgr\fP will check its configuration file (which is described
+below in the FILES section) for updates on a regular basis. If the
+file has changed, it will be reread and \fBhubmgr\fP will connect to
+any new hubs encountered, as well as disconnect from hubs that have
+been removed from the file.
.SH OPTIONS
.TP
.B -d
(same (car delta))
(del (cadr delta))
(new (caddr delta)))
- (display same) (newline)
- (display del) (newline)
- (display new) (newline)
(for-each (lambda (o)
(let ((el (assq o connlist)))
(if el