Fix rtl_ircd startup sequence
This commit is contained in:
parent
5d90fa8c24
commit
724a58930f
@ -519,8 +519,10 @@ static void rtl_ircd(void * data, char * name) {
|
|||||||
char * buf = malloc(4096);
|
char * buf = malloc(4096);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
fgets(buf, 4096, irc_socket);
|
char * result = fgets(buf, 4095, irc_socket);
|
||||||
|
if (!result) continue;
|
||||||
size_t len = strlen(buf);
|
size_t len = strlen(buf);
|
||||||
|
if (!len) continue;
|
||||||
|
|
||||||
handle_irc_packet(tty, len, (unsigned char *)buf);
|
handle_irc_packet(tty, len, (unsigned char *)buf);
|
||||||
}
|
}
|
||||||
@ -778,6 +780,8 @@ static void rtl_netd(void * data, char * name) {
|
|||||||
irc_socket = make_pipe(4096);
|
irc_socket = make_pipe(4096);
|
||||||
vfs_mount("/dev/net_irc", irc_socket);
|
vfs_mount("/dev/net_irc", irc_socket);
|
||||||
|
|
||||||
|
create_kernel_tasklet(rtl_ircd, "[ircd]", tty);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
sleep_on(rx_wait);
|
sleep_on(rx_wait);
|
||||||
@ -1123,7 +1127,6 @@ DEFINE_SHELL_FUNCTION(rtl, "rtl8139 experiments") {
|
|||||||
fprintf(tty, "Card is configured, going to start worker thread now.\n");
|
fprintf(tty, "Card is configured, going to start worker thread now.\n");
|
||||||
|
|
||||||
create_kernel_tasklet(rtl_netd, "[netd]", tty);
|
create_kernel_tasklet(rtl_netd, "[netd]", tty);
|
||||||
create_kernel_tasklet(rtl_ircd, "[ircd]", tty);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user