resolve some conflicts from merging from martins branch
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 26 Nov 2009 02:42:12 +0000 (13:42 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 26 Nov 2009 02:42:12 +0000 (13:42 +1100)
server/eventscript.c

index e04dd48db14b3629a2845b12e084a454bd2bfbdb..a1ac36eb479e9d400745b3cab4c5814b1d3b9ca7 100644 (file)
@@ -809,12 +809,8 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb,
                        ctdb->current_monitor_status_ctx = NULL;
                }
 
-<<<<<<< HEAD:server/eventscript.c
-               ctdb->current_monitor_status_ctx = talloc(ctdb->monitor_event_script_ctx, struct ctdb_monitor_script_status_ctx);
-=======
                ctdb->current_monitor_status_ctx = talloc(ctdb, struct ctdb_monitor_script_status_ctx);
                CTDB_NO_MEMORY(ctdb, ctdb->current_monitor_status_ctx);
->>>>>>> martins-svart/status-test-2:server/eventscript.c
                ctdb->current_monitor_status_ctx->scripts = NULL;
        } else {
                /* any other script will first terminate any monitor event */
@@ -823,17 +819,9 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb,
                        ctdb->monitor_event_script_ctx = NULL;
                }
                /* and then use a context common for all non-monitor events */
-<<<<<<< HEAD:server/eventscript.c
-               if (ctdb->other_event_script_ctx != NULL) {
-                       talloc_free(ctdb->other_event_script_ctx);
-                       ctdb->other_event_script_ctx = NULL;
-               }
-               ctdb->other_event_script_ctx = talloc_new(ctdb);
-=======
                if (ctdb->other_event_script_ctx == NULL) {
                        ctdb->other_event_script_ctx = talloc_new(ctdb);
                }
->>>>>>> martins-svart/status-test-2:server/eventscript.c
                mem_ctx = ctdb->other_event_script_ctx;
        }
 
@@ -1005,11 +993,8 @@ static void run_eventscripts_callback(struct ctdb_context *ctdb, int status,
        return;
 }
 
-<<<<<<< HEAD:server/eventscript.c
 
-=======
 /* Returns rest of string, or NULL if no match. */
->>>>>>> martins-svart/status-test-2:server/eventscript.c
 static const char *get_call(const char *p, enum ctdb_eventscript_call *call)
 {
        unsigned int len;
@@ -1021,21 +1006,10 @@ static const char *get_call(const char *p, enum ctdb_eventscript_call *call)
        for (*call = 0; *call < ARRAY_SIZE(call_names); (*call)++) {
                len = strlen(call_names[*call]);
                if (strncmp(p, call_names[*call], len) == 0) {
-<<<<<<< HEAD:server/eventscript.c
-                       /* If that's it, we're good. */
-                       if (*p == '\0')
-                               return p;
-                       /* Otherwise, if whitespace is next, good. */
-                       len = strspn(p, " \t");
-                       if (len)
-                               return p + len;
-                       /* Hmm, extra chars: keep looking. */
-=======
                        /* If end of string or whitespace, we're done. */
                        if (strcspn(p + len, " \t") == 0) {
                                return p + len;
                        }
->>>>>>> martins-svart/status-test-2:server/eventscript.c
                }
        }
        return NULL;