version 1.2.2.2, 2014/02/21 15:58:30
|
version 1.3, 2014/02/24 15:23:39
|
Line 45 SUCH DAMAGE.
|
Line 45 SUCH DAMAGE.
|
*/ |
*/ |
#include "global.h" |
#include "global.h" |
#include "srv.h" |
#include "srv.h" |
|
#include "buf.h" |
|
|
|
|
intptr_t Kill; |
intptr_t Kill; |
struct tagCli cli; |
struct tagCli cli; |
cfg_root_t cfg; |
cfg_root_t cfg; |
sched_root_task_t *root; |
sched_root_task_t *root; |
ait_val_t *bufIO; | rpack_t *bf; |
char szCfgName[PATH_MAX] = DEFAULT_CFGNAME; |
char szCfgName[PATH_MAX] = DEFAULT_CFGNAME; |
struct timespec timeout = { DEFAULT_TIMEOUT, 0 }; |
struct timespec timeout = { DEFAULT_TIMEOUT, 0 }; |
extern char compiled[], compiledby[], compilehost[]; |
extern char compiled[], compiledby[], compilehost[]; |
Line 102 sigHandler(sched_task_t *task)
|
Line 103 sigHandler(sched_task_t *task)
|
if (str) |
if (str) |
timeout.tv_sec = strtol(str, NULL, 10); |
timeout.tv_sec = strtol(str, NULL, 10); |
|
|
ait_freeVar(&bufIO); | endBuffer(); |
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
if (str) { | if (str) |
bufIO = ait_allocVar(); | initBuffer(strtol(str, NULL, 0)); |
if (bufIO) | |
AIT_SET_BUFSIZ(bufIO, 0, strtol(str, NULL, 0)); | |
} | |
break; |
break; |
case SIGINT: |
case SIGINT: |
case SIGTERM: |
case SIGTERM: |
Line 249 main(int argc, char **argv)
|
Line 247 main(int argc, char **argv)
|
} |
} |
|
|
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
if (str) { | if (str) |
bufIO = ait_allocVar(); | initBuffer(strtol(str, NULL, 0)); |
if (bufIO) | |
AIT_SET_BUFSIZ(bufIO, 0, strtol(str, NULL, 0)); | |
} | |
|
|
if (!(pkt = rpack_create(NULL, 0))) { |
if (!(pkt = rpack_create(NULL, 0))) { |
ELIBERR(elwix); |
ELIBERR(elwix); |
Line 281 end:
|
Line 276 end:
|
schedEnd(&root); |
schedEnd(&root); |
rpack_detach(pkt); |
rpack_detach(pkt); |
rpack_destroy(&pkt); |
rpack_destroy(&pkt); |
ait_freeVar(&bufIO); | endBuffer(); |
cfgUnloadConfig(&cfg); |
cfgUnloadConfig(&cfg); |
closelog(); |
closelog(); |
return ret; |
return ret; |