forked from soccera/rdo
Move variable declerations to start of file
This commit is contained in:
parent
a30dffcf5d
commit
5bc96bc7f4
1 changed files with 6 additions and 6 deletions
12
sessions.h
12
sessions.h
|
@ -78,12 +78,12 @@ int ensuredir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setsession(int pid, unsigned int ts_ttl) {
|
void setsession(int pid, unsigned int ts_ttl) {
|
||||||
if (ts_ttl == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
unsigned long long startts;
|
unsigned long long startts;
|
||||||
char path[1024], ts_str[32];
|
char path[1024], ts_str[32];
|
||||||
|
|
||||||
|
if (ts_ttl == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (ensuredir() < 0 || getpstartts(pid, &startts) < 0)
|
if (ensuredir() < 0 || getpstartts(pid, &startts) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -109,12 +109,12 @@ void setsession(int pid, unsigned int ts_ttl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int getsession(int pid, unsigned int ts_ttl) {
|
int getsession(int pid, unsigned int ts_ttl) {
|
||||||
if (ts_ttl == 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
unsigned long long startts, current;
|
unsigned long long startts, current;
|
||||||
char path[1024], ts_str[32];
|
char path[1024], ts_str[32];
|
||||||
|
|
||||||
|
if (ts_ttl == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (ensuredir() < 0 || getpstartts(pid, &startts) < 0)
|
if (ensuredir() < 0 || getpstartts(pid, &startts) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue