From 44b06f9f8c502d868e5f1f56f7d1d95b773086b2 Mon Sep 17 00:00:00 2001 From: jiyoungcheon Date: Fri, 10 Jan 2025 05:11:34 -0500 Subject: [PATCH] to see what happens after init --- icshttp/handler.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/icshttp/handler.go b/icshttp/handler.go index 256527f..471e34b 100644 --- a/icshttp/handler.go +++ b/icshttp/handler.go @@ -580,21 +580,22 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) { // 맵을 JSON으로 마샬링 uuiJSON, err := json.Marshal(uuiMap) if err != nil { - fmt.Println("Error marshaling UUI:", err) + l.Printf(icslog.LOG_LEVEL_ERROR, -1, "Error marshaling UUI: %v", err) + return } // 마샬링된 JSON을 json.RawMessage로 변환 response.Data.UUI = json.RawMessage(uuiJSON) response.Data.TelNo = request.TelNo - s.m.Unlock() + // s.m.Unlock() // response marshal resMarshal, jerr := json.Marshal(response) if jerr != nil { - fmt.Println("Json Marshal error ", jerr) + l.Printf(icslog.LOG_LEVEL_ERROR, -1, "Json Marshal error %v", jerr) } - fmt.Printf("%+v", response) + l.Printf(icslog.LOG_LEVEL_INFO, -1, "%+v", response) l.Printf(icslog.LOG_LEVEL_INFO, -1, "Send Message\n %s", string(resMarshal)) // if s.session[request.Token].Count < len(scnarioConf[dnis]) && scnarioConf[dnis][s.session[request.Token].Count].TimeValue {