mirror of
https://github.com/craigerl/aprsd.git
synced 2025-05-30 05:02:28 -04:00
Fixed send-message after config/client rework
This patch fixes the send-message from the command line ability after the complete rework of the client classes.
This commit is contained in:
parent
f8d87d05bb
commit
725bb2fe35
@ -351,8 +351,8 @@ def send_message(
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cl = client.Client(config)
|
client.ClientFactory.setup(config)
|
||||||
cl.setup_connection()
|
client.factory.create().client
|
||||||
except LoginError:
|
except LoginError:
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ def send_message(
|
|||||||
# This will register a packet consumer with aprslib
|
# This will register a packet consumer with aprslib
|
||||||
# When new packets come in the consumer will process
|
# When new packets come in the consumer will process
|
||||||
# the packet
|
# the packet
|
||||||
aprs_client = client.get_client()
|
aprs_client = client.factory.create().client
|
||||||
aprs_client.consumer(rx_packet, raw=False)
|
aprs_client.consumer(rx_packet, raw=False)
|
||||||
except aprslib.exceptions.ConnectionDrop:
|
except aprslib.exceptions.ConnectionDrop:
|
||||||
LOG.error("Connection dropped, reconnecting")
|
LOG.error("Connection dropped, reconnecting")
|
||||||
@ -387,7 +387,7 @@ def send_message(
|
|||||||
# Force the deletion of the client object connected to aprs
|
# Force the deletion of the client object connected to aprs
|
||||||
# This will cause a reconnect, next time client.get_client()
|
# This will cause a reconnect, next time client.get_client()
|
||||||
# is called
|
# is called
|
||||||
cl.reset()
|
aprs_client.reset()
|
||||||
|
|
||||||
|
|
||||||
# main() ###
|
# main() ###
|
||||||
|
Loading…
x
Reference in New Issue
Block a user