diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000000..13566b81b01 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 00000000000..919ce1f1f77 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 00000000000..a55e7a179bd --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/ejabberd.iml b/.idea/ejabberd.iml new file mode 100644 index 00000000000..d6ebd480598 --- /dev/null +++ b/.idea/ejabberd.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000000..112694c6294 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000000..cc6eae03c93 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000000..fe5c6686597 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/rebar.xml b/.idea/rebar.xml new file mode 100644 index 00000000000..ae4ef621d70 --- /dev/null +++ b/.idea/rebar.xml @@ -0,0 +1,6 @@ + + + + $PROJECT_DIR$/rebar + + \ No newline at end of file diff --git a/.idea/sbt.xml b/.idea/sbt.xml new file mode 100644 index 00000000000..20187435474 --- /dev/null +++ b/.idea/sbt.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/scala_compiler.xml b/.idea/scala_compiler.xml new file mode 100644 index 00000000000..3c0e0f6f64b --- /dev/null +++ b/.idea/scala_compiler.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000000..35eb1ddfbbc --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/conf/ejabberd.yml b/conf/ejabberd.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/ejabberd_sm_sql.erl b/src/ejabberd_sm_sql.erl index ff06d3ddac7..f9754431d02 100644 --- a/src/ejabberd_sm_sql.erl +++ b/src/ejabberd_sm_sql.erl @@ -52,14 +52,18 @@ init() -> case ejabberd_sql:sql_query( Host, ?SQL("delete from sm where node=%(Node)s")) of {updated, _} -> + ?DEBUG("Successfully cleaned 'sm' table on host: ~p", [Host]), ok; Err -> + ?DEBUG("Error tatata", []), ?ERROR_MSG("Failed to clean 'sm' table: ~p", [Err]), {error, db_failure} end; (_, Err) -> + ?DEBUG("Another case...", []), Err - end, ok, ejabberd_sm:get_vh_by_backend(?MODULE)). + end, ok, ejabberd_sm:get_vh_by_backend(?MODULE)), + ?DEBUG("Bullshit done...", []). schemas() -> [#sql_schema{ diff --git a/src/ejabberd_sql.erl b/src/ejabberd_sql.erl index 1e60b6fa7ba..06144c04e1e 100644 --- a/src/ejabberd_sql.erl +++ b/src/ejabberd_sql.erl @@ -144,10 +144,12 @@ sql_call(Host, Msg) -> Timeout = query_timeout(Host), case get(?STATE_KEY) of undefined -> + ?DEBUG("No existing state", []), sync_send_event(Host, {sql_cmd, Msg, current_time() + Timeout}, Timeout); _State -> + ?DEBUG("Existing state", [_State]), nested_op(Msg) end. diff --git a/src/ejabberd_sql_schema.erl b/src/ejabberd_sql_schema.erl index 172bc41e46a..e7fc5e6ae02 100644 --- a/src/ejabberd_sql_schema.erl +++ b/src/ejabberd_sql_schema.erl @@ -36,6 +36,7 @@ start(Host) -> case should_update_schema(Host) of true -> + ?DEBUG("Should update schema", []), case table_exists(Host, <<"schema_version">>) of true -> ok; @@ -52,6 +53,7 @@ start(Host) -> end end; false -> + ?DEBUG("Should not update schema", []), ok end.