mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
clean out ANDROID_TRIGGERED
This commit is contained in:
parent
e8d4cecee0
commit
008ae5d937
1 changed files with 0 additions and 6 deletions
|
@ -56,7 +56,6 @@ PORT={{ captiveportal_port }}
|
||||||
|
|
||||||
|
|
||||||
# Define globals
|
# Define globals
|
||||||
ANDROID_TRIGGERED=False
|
|
||||||
|
|
||||||
logger.debug("")
|
logger.debug("")
|
||||||
logger.debug('##########################################')
|
logger.debug('##########################################')
|
||||||
|
@ -136,12 +135,10 @@ def is_after204_timeout(ip):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def set_204after(ip,value):
|
def set_204after(ip,value):
|
||||||
global ANDROID_TRIGGERED
|
|
||||||
ts=tstamp(datetime.datetime.now(tzutc()))
|
ts=tstamp(datetime.datetime.now(tzutc()))
|
||||||
sql = 'UPDATE users SET send204after = ? where ip = ?'
|
sql = 'UPDATE users SET send204after = ? where ip = ?'
|
||||||
c.execute(sql,(ts + value,ip,))
|
c.execute(sql,(ts + value,ip,))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
ANDROID_TRIGGERED = False
|
|
||||||
|
|
||||||
def set_lasttimestamp(ip):
|
def set_lasttimestamp(ip):
|
||||||
ts=tstamp(datetime.datetime.now(tzutc()))
|
ts=tstamp(datetime.datetime.now(tzutc()))
|
||||||
|
@ -178,7 +175,6 @@ def home(environ,start_response):
|
||||||
return [response_body]
|
return [response_body]
|
||||||
|
|
||||||
def android(environ, start_response):
|
def android(environ, start_response):
|
||||||
global ANDROID_TRIGGERED
|
|
||||||
if environ.get('HTTP_X_FORWARDED_FOR'):
|
if environ.get('HTTP_X_FORWARDED_FOR'):
|
||||||
ip = environ['HTTP_X_FORWARDED_FOR'].strip()
|
ip = environ['HTTP_X_FORWARDED_FOR'].strip()
|
||||||
else:
|
else:
|
||||||
|
@ -388,7 +384,6 @@ def application (environ, start_response):
|
||||||
global CATCH
|
global CATCH
|
||||||
global LIST
|
global LIST
|
||||||
global INACTIVITY_TO
|
global INACTIVITY_TO
|
||||||
global ANDROID_TRIGGERED
|
|
||||||
|
|
||||||
if 'HTTP_X_FORWARDED_FOR' in environ:
|
if 'HTTP_X_FORWARDED_FOR' in environ:
|
||||||
ip = environ['HTTP_X_FORWARDED_FOR'].strip()
|
ip = environ['HTTP_X_FORWARDED_FOR'].strip()
|
||||||
|
@ -445,7 +440,6 @@ def application (environ, start_response):
|
||||||
if environ['PATH_INFO'] == "/home_selected":
|
if environ['PATH_INFO'] == "/home_selected":
|
||||||
# the js link to home page triggers this ajax url
|
# the js link to home page triggers this ajax url
|
||||||
# mark the sign-in conversation completed, return 204 or Success or Success
|
# mark the sign-in conversation completed, return 204 or Success or Success
|
||||||
ANDROID_TRIGGERED = True
|
|
||||||
#data = ['{}: {}\n'.format(key, value) for key, value in sorted(environ.items()) ]
|
#data = ['{}: {}\n'.format(key, value) for key, value in sorted(environ.items()) ]
|
||||||
#logger.debug("need the correct ip:{}".format(data))
|
#logger.debug("need the correct ip:{}".format(data))
|
||||||
logger.debug("function: home_selected. Setting flag to return_204")
|
logger.debug("function: home_selected. Setting flag to return_204")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue