Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Schrödingbug in lspeers.
[doldaconnect.git]
/
daemon
/
fnet-adc.c
diff --git
a/daemon/fnet-adc.c
b/daemon/fnet-adc.c
index
1357257
..
ecbffe3
100644
(file)
--- a/
daemon/fnet-adc.c
+++ b/
daemon/fnet-adc.c
@@
-38,7
+38,7
@@
#include "transfer.h"
#include "sysevents.h"
#include "net.h"
#include "transfer.h"
#include "sysevents.h"
#include "net.h"
-#include
"tiger.h"
+#include
<tiger.h>
/* Protocol states */
#define ADC_PROTOCOL 0
/* Protocol states */
#define ADC_PROTOCOL 0
@@
-67,6
+67,7
@@
struct adchub {
wchar_t **sup;
iconv_t ich;
int state;
wchar_t **sup;
iconv_t ich;
int state;
+ struct wcspair *hubinf;
struct qcmd *queue;
};
struct qcmd *queue;
};
@@
-215,6
+216,7
@@
ADC_CMDFN(cmd_sup)
} else if(!wcsncmp(argv[i], L"RM", 2)) {
if(!f)
continue;
} else if(!wcsncmp(argv[i], L"RM", 2)) {
if(!f)
continue;
+ free(hub->sup[o]);
memmove(hub->sup[o], hub->sup[o + 1], parrlen(hub->sup) - o);
}
}
memmove(hub->sup[o], hub->sup[o + 1], parrlen(hub->sup) - o);
}
}
@@
-232,9
+234,19
@@
ADC_CMDFN(cmd_sid)
}
}
}
}
+ADC_CMDFN(cmd_inf)
+{
+ ADC_CMDCOM;
+
+ if(sender == NULL) {
+
+ }
+}
+
static struct command hubcmds[] = {
{L"SUP", 1, 0, cmd_sup},
{L"SID", 2, 0, cmd_sid},
static struct command hubcmds[] = {
{L"SUP", 1, 0, cmd_sup},
{L"SID", 2, 0, cmd_sid},
+ {L"INF", 0, 0, cmd_inf},
{NULL, 0, 0, NULL}
};
{NULL, 0, 0, NULL}
};
@@
-376,7
+388,7
@@
static int hubreqconn(struct fnetpeer *peer)
return(0);
}
return(0);
}
-static struct fnet adcnet = {
+static struct fnet adcnet
_store
= {
.connect = hubconnect,
.destroy = hubdestroy,
.setnick = hubsetnick,
.connect = hubconnect,
.destroy = hubdestroy,
.setnick = hubsetnick,
@@
-384,6
+396,8
@@
static struct fnet adcnet = {
.name = L"adc"
};
.name = L"adc"
};
+static struct fnet *adcnet = &adcnet_store;
+
static int run(void)
{
int ret;
static int run(void)
{
int ret;
@@
-394,7
+408,7
@@
static int run(void)
ret = 0;
for(fn = fnetnodes; fn != NULL; fn = nextfn) {
nextfn = fn->next;
ret = 0;
for(fn = fnetnodes; fn != NULL; fn = nextfn) {
nextfn = fn->next;
- if(fn->fnet !=
&
adcnet)
+ if(fn->fnet != adcnet)
continue;
if((hub = fn->data) == NULL)
continue;
continue;
if((hub = fn->data) == NULL)
continue;
@@
-413,7
+427,7
@@
static void preinit(int hup)
{
if(hup)
return;
{
if(hup)
return;
- regfnet(
&
adcnet);
+ regfnet(adcnet);
}
static int init(int hup)
}
static int init(int hup)