|
|
| version 1.2.2.1, 2014/02/21 15:49:51 | version 1.2.2.2, 2014/02/21 15:58:30 |
|---|---|
| Line 51 intptr_t Kill; | Line 51 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; | |
| 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 100 sigHandler(sched_task_t *task) | Line 101 sigHandler(sched_task_t *task) |
| str = cfg_getAttribute(&cfg, "tftpd", "timeout"); | str = cfg_getAttribute(&cfg, "tftpd", "timeout"); |
| if (str) | if (str) |
| timeout.tv_sec = strtol(str, NULL, 10); | timeout.tv_sec = strtol(str, NULL, 10); |
| ait_freeVar(&bufIO); | |
| str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); | |
| if (str) { | |
| bufIO = ait_allocVar(); | |
| if (bufIO) | |
| AIT_SET_BUFSIZ(bufIO, 0, strtol(str, NULL, 0)); | |
| } | |
| break; | break; |
| case SIGINT: | case SIGINT: |
| case SIGTERM: | case SIGTERM: |
| Line 239 main(int argc, char **argv) | Line 248 main(int argc, char **argv) |
| chdir(str); | chdir(str); |
| } | } |
| str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); | |
| if (str) { | |
| bufIO = ait_allocVar(); | |
| 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); |
| close(fd); | close(fd); |
| Line 265 end: | Line 281 end: |
| schedEnd(&root); | schedEnd(&root); |
| rpack_detach(pkt); | rpack_detach(pkt); |
| rpack_destroy(&pkt); | rpack_destroy(&pkt); |
| ait_freeVar(&bufIO); | |
| cfgUnloadConfig(&cfg); | cfgUnloadConfig(&cfg); |
| closelog(); | closelog(); |
| return ret; | return ret; |