mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:41:59 +01:00
0.1.7 fixes #2
This commit is contained in:
parent
072caae0c9
commit
0f5ae4fb2d
@ -18,7 +18,7 @@
|
||||
|
||||
int store_attachments(struct session_data *sdata, struct _state *state, struct __config *cfg){
|
||||
uint64 id=0;
|
||||
int i, found;
|
||||
int i, found, affected_rows;
|
||||
char s[SMALLBUFSIZE];
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
@ -117,6 +117,12 @@ int store_attachments(struct session_data *sdata, struct _state *state, struct _
|
||||
return 1;
|
||||
}
|
||||
|
||||
affected_rows = mysql_stmt_affected_rows(stmt);
|
||||
if(affected_rows != 1){
|
||||
syslog(LOG_PRIORITY, "%s attachment sql error: affected rows: %d", sdata->ttmpfile, affected_rows);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
syslog(LOG_PRIORITY, "%s: skipping attachment (serial: %d, size: %d, digest: %s)", sdata->ttmpfile, i, state->attachments[i].size, state->attachments[i].digest);
|
||||
|
Loading…
Reference in New Issue
Block a user