summaryrefslogtreecommitdiffstats
path: root/src/sessionp.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-15 12:18:43 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-15 12:18:43 +0200
commit38084f56e0fea23249b010f0fc37c20c33871840 (patch)
tree5e61e5a3c746eeec3c14d95b640c6b996dd50bf7 /src/sessionp.c
parent9e18c597cb24f7d68fb6d8b49bf0f9c13c918749 (diff)
session_save(): returns if STATUS_QUIT
Diffstat (limited to 'src/sessionp.c')
-rw-r--r--src/sessionp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sessionp.c b/src/sessionp.c
index d04246b..a5b2b18 100644
--- a/src/sessionp.c
+++ b/src/sessionp.c
@@ -162,6 +162,8 @@ int session_load(char **cmd_device, char **current_cmd, alloc_data_t *list_free_
int session_save(alloc_data_t *list_free_space, struct ph_param *params, const struct ph_options *options)
{
FILE *f_session;
+ if(params->status==STATUS_QUIT)
+ return 0;
f_session=fopen(SESSION_FILENAME,"wb");
if(!f_session)
{
@@ -286,7 +288,7 @@ int session_save(alloc_data_t *list_free_space, struct ph_param *params, const
case STATUS_QUIT:
break;
}
- if(params->status!=STATUS_QUIT && params->offset!=-1)
+ if(params->status!=STATUS_FIND_OFFSET && params->offset!=-1)
fprintf(f_session, "%llu,",
(long long unsigned)(params->offset/params->disk->sector_size));
fprintf(f_session,"inter\n");