version 1.2.2.1, 2014/02/21 15:49:51
|
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; |
|
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 100 sigHandler(sched_task_t *task)
|
Line 102 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); |
|
|
|
endBuffer(); |
|
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
|
if (str) |
|
initBuffer(strtol(str, NULL, 0)); |
break; |
break; |
case SIGINT: |
case SIGINT: |
case SIGTERM: |
case SIGTERM: |
Line 239 main(int argc, char **argv)
|
Line 246 main(int argc, char **argv)
|
chdir(str); |
chdir(str); |
} |
} |
|
|
|
str = cfg_getAttribute(&cfg, "tftpd", "buf_io"); |
|
if (str) |
|
initBuffer(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 276 end:
|
schedEnd(&root); |
schedEnd(&root); |
rpack_detach(pkt); |
rpack_detach(pkt); |
rpack_destroy(&pkt); |
rpack_destroy(&pkt); |
|
endBuffer(); |
cfgUnloadConfig(&cfg); |
cfgUnloadConfig(&cfg); |
closelog(); |
closelog(); |
return ret; |
return ret; |