Skip to content

Commit

Permalink
Merge branch 'master' into email_dep
Browse files Browse the repository at this point in the history
  • Loading branch information
randeepsingh01 authored Oct 16, 2023
2 parents c4cabbf + 8f0787e commit cad9ad2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class Connection : IConnection
private bool disposedValue;
private readonly object _lock = new object();
private EventHandler<RecordChangedEventArgs> _recordChanged;

private Interop.Sqlite.UpdateHookCallback _hook;

static Connection()
{
Expand Down Expand Up @@ -70,6 +70,7 @@ public void Close()
Interop.Sqlite.UpdateHook(_db, null, IntPtr.Zero);
Interop.Sqlite.Close(_db);
_opened = false;
_hook = null;
}
}

Expand Down Expand Up @@ -154,7 +155,12 @@ public void Open(Uri uri)
if (ret != (int)Interop.Sqlite.ResultCode.SQLITE_OK)
throw new InvalidOperationException("code:" + ret);

Interop.Sqlite.UpdateHook(_db, UpdateHookCallback, IntPtr.Zero);
if (_hook == null)
{
_hook = new Interop.Sqlite.UpdateHookCallback(UpdateHookCallback);
}

Interop.Sqlite.UpdateHook(_db, _hook, IntPtr.Zero);
_opened = true;
}

Expand Down
2 changes: 2 additions & 0 deletions src/Tizen.System.Feedback/Feedback/Feedback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ public class Feedback
{"BurnerMoved", 40030},
{"Connected", 40031},
{"Disconnected", 40032},
{"Welcome", 40033},
{"AutoDoorOpen", 40034},
};

/// <summary>
Expand Down

0 comments on commit cad9ad2

Please sign in to comment.