From 77163513fc7f31ef8cf6e97e7319b02d9d6c8fd5 Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 13 Aug 2023 11:54:05 +0800 Subject: [PATCH] 1 --- server/imserver/app.go | 15 +++++++++------ server/imserver/main.go | 8 +++++--- third_party/f5 | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/server/imserver/app.go b/server/imserver/app.go index 13bdda84..e8619995 100644 --- a/server/imserver/app.go +++ b/server/imserver/app.go @@ -12,7 +12,6 @@ import ( ) type App struct { - f5.App_ msgMutex sync.Mutex msgList q5.ListHead workList q5.ListHead @@ -21,9 +20,9 @@ type App struct { var app = new (App) func (this *App) Init() { - f5.App = &this.App_ - f5.App.SetPkgName("imserver") - this.App_.Init(this.Update) + //f5.App = &this.F5App + //f5.App.SetPkgName("imserver") + //this.F5App.Init(this.Update) this.msgList.Init(nil) this.workList.Init(nil) f5.LoadMetaTable(mt.Table) @@ -37,7 +36,7 @@ func (this *App) Init() { func (this *App) UnInit() { handlerMgr.UnInit() wspListener.UnInit() - this.App_.UnInit() + //this.F5App.UnInit() } func (this *App) Update() { @@ -89,5 +88,9 @@ func (this *App) addNetMsg(hdr *f5.MsgHdr) { defer this.msgMutex.Unlock() this.msgList.AddTail(&hdr.Entry); } - this.NotifyLoopCond() + //this.NotifyLoopCond() +} + +func (this *App) GetPkgName() string { + return "imserver" } diff --git a/server/imserver/main.go b/server/imserver/main.go index ca0e2adf..90187b72 100644 --- a/server/imserver/main.go +++ b/server/imserver/main.go @@ -1,7 +1,9 @@ package main +import ( + "f5" +) + func main() { - app.Init() - app.Run() - app.UnInit() + f5.Run(app) } diff --git a/third_party/f5 b/third_party/f5 index 81321f5d..c6e4546c 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 81321f5d0cf5bea5da63c746318f6a5be6e32aaf +Subproject commit c6e4546c133727b954c0f6745e70dadbeab50f1a