summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-11-29 15:31:19 +0300
committerKozlov Dmitry <dima@server>2010-11-29 15:31:19 +0300
commit3a293aabc6e43319761a1f3020559873aa714334 (patch)
treeffc1df6952fb66dea7e9d15b5910c4c0576cbe5f
parent760e74984ee083ac86e8b03f9e43613a1b7f12c8 (diff)
downloadaccel-ppp-xebd-3a293aabc6e43319761a1f3020559873aa714334.tar.gz
accel-ppp-xebd-3a293aabc6e43319761a1f3020559873aa714334.zip
ppp: fixed bug when saving seq
-rw-r--r--accel-pptpd/ppp/ppp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c
index 4b472ff..a30fa81 100644
--- a/accel-pptpd/ppp/ppp.c
+++ b/accel-pptpd/ppp/ppp.c
@@ -596,8 +596,10 @@ static void save_seq(void)
opt = "/var/run/accel-pptp/seq";
f = fopen(opt, "w");
- fprintf(f, "%llu", sid);
- fclose(f);
+ if (f) {
+ fprintf(f, "%llu", sid);
+ fclose(f);
+ }
}
static void __init init(void)