When tunnel doesn't PONG, ask to check firewall

This commit is contained in:
nemunaire 2023-03-18 10:42:29 +01:00
commit 94ed539e01
2 changed files with 14 additions and 0 deletions

View file

@ -135,6 +135,12 @@ func (s *Student) GetStates() (ucs []*UnlockedChallenge, err error) {
}
}
func (s *Student) GetChallengeError(challenge_id int) (uc *ErroredChallenge, err error) {
uc = new(ErroredChallenge)
err = DBQueryRow("SELECT id_st, challenge, time, error FROM student_challenge_errors WHERE id_student = ? AND challenge = ?", s.Id, challenge_id).Scan(&uc.Id, &uc.Challenge, &uc.Time, &uc.Error)
return
}
func (s *Student) GetChallengeErrors() (ucs []*ErroredChallenge, err error) {
if rows, errr := DBQuery("SELECT id_st, challenge, time, error FROM student_challenge_errors WHERE id_student = ?", s.Id); errr != nil {
return nil, errr