Kaynağa Gözat

Ticket #608 - Posix Winsync plugin throws "posix_winsync_end_update_cb: failed to add task entry" error message

Bug description: When a task posixWinsyncCreateMemberOfTask is
already running, another same task request is received, the
Posix Winsync Plug-in issues an error "posix-winsync - posix_
winsync_end_update_cb: failed to add task entry".  This is not
an "error" but an expected behaviour.

Fix description: Instead of filing the message as SLAPI_LOG_
FATAL, this patch logs clearer message "task entry <taskname>
already exists" if the log level is SLAPI_LOG_PLUGIN.
posix_winsync_end_update_cb

https://fedorahosted.org/389/ticket/608

Reviewed by Mark (Thank you!!)
Noriko Hosoi 12 yıl önce
ebeveyn
işleme
05803a4289

+ 7 - 3
ldap/servers/plugins/posix-winsync/posix-winsync.c

@@ -1396,12 +1396,16 @@ posix_winsync_end_update_cb(void *cbdata, const Slapi_DN *ds_subtree, const Slap
         slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
                         "--> posix_winsync_end_update_cb, retrieving return code\n");
         slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
-        if (rc != 0) {
+        if (LDAP_ALREADY_EXISTS == rc) {
+            slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
+                            "posix_winsync_end_update_cb: "
+                                "task entry %s already exists\n",
+                                posix_winsync_plugin_name);
+        } else if (rc != 0) {
             slapi_log_error(SLAPI_LOG_FATAL, posix_winsync_plugin_name,
                             "posix_winsync_end_update_cb: "
-                                "failed to add task entry\n");
+                                "failed to add task entry (%d)\n", rc);
         } else {
-
             slapi_log_error(SLAPI_LOG_PLUGIN, posix_winsync_plugin_name,
                             "posix_winsync_end_update_cb: "
                                 "add task entry\n");