X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=gps303%2Fevstore.py;h=07b6dc4b760b7de08349611e844168ab0e80470a;hp=2b23e8e92ef98e4c5ff21a584be786df179859ad;hb=c3bc6d5bbdc0d0bf10e338c6e3bad1a519d5afa0;hpb=d6d5b6c95b677d98777959040bac808e4c5499c7 diff --git a/gps303/evstore.py b/gps303/evstore.py index 2b23e8e..07b6dc4 100644 --- a/gps303/evstore.py +++ b/gps303/evstore.py @@ -12,7 +12,7 @@ SCHEMA = """create table if not exists events ( imei text, peeraddr text not null, is_incoming int not null default TRUE, - proto int not null, + proto text not null, packet blob )""" @@ -38,7 +38,7 @@ def stow(**kwargs: Any) -> None: ("peeraddr", None), ("when", 0.0), ("imei", None), - ("proto", -1), + ("proto", "UNKNOWN"), ("packet", b""), ) } @@ -55,7 +55,7 @@ def stow(**kwargs: Any) -> None: def fetch( - imei: str, matchlist: List[Tuple[bool, int]], backlog: int + imei: str, matchlist: List[Tuple[bool, str]], backlog: int ) -> List[Tuple[bool, float, bytes]]: # matchlist is a list of tuples (is_incoming, proto) # returns a list of tuples (is_incoming, timestamp, packet)