server: change prototype of add_service()
[openocd.git] / src / target / arm_tpiu_swo.c
index bfe9081425ebe5bae82c89be59360317ea5f21e7..a0eba6782d972a16ac3f018cf136a2ebc9464d85 100644 (file)
@@ -582,6 +582,15 @@ static int wrap_read_u32(struct target *target, struct adiv5_ap *tpiu_ap,
                return mem_ap_read_atomic_u32(tpiu_ap, address, value);
 }
 
+static const struct service_driver arm_tpiu_swo_service_driver = {
+       .name = "tpiu_swo_trace",
+       .new_connection_during_keep_alive_handler = NULL,
+       .new_connection_handler = arm_tpiu_swo_service_new_connection,
+       .input_handler = arm_tpiu_swo_service_input,
+       .connection_closed_handler = arm_tpiu_swo_service_connection_closed,
+       .keep_client_alive_handler = NULL,
+};
+
 static int jim_arm_tpiu_swo_enable(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
 {
        struct command *c = jim_to_command(interp);
@@ -700,10 +709,8 @@ static int jim_arm_tpiu_swo_enable(Jim_Interp *interp, int argc, Jim_Obj *const
                        }
                        priv->obj = obj;
                        LOG_INFO("starting trace server for %s on %s", obj->name, &obj->out_filename[1]);
-                       retval = add_service("tpiu_swo_trace", &obj->out_filename[1],
-                               CONNECTION_LIMIT_UNLIMITED, arm_tpiu_swo_service_new_connection,
-                               arm_tpiu_swo_service_input, arm_tpiu_swo_service_connection_closed,
-                               priv);
+                       retval = add_service(&arm_tpiu_swo_service_driver, &obj->out_filename[1],
+                               CONNECTION_LIMIT_UNLIMITED, priv);
                        if (retval != ERROR_OK) {
                                LOG_ERROR("Can't configure trace TCP port %s", &obj->out_filename[1]);
                                return JIM_ERR;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)