Commit 18c18d6b authored by Lubomir Bulej's avatar Lubomir Bulej

DiSL-Agent: Cosmetic changes, set eol-style to native.

parent bd449e19
......@@ -155,16 +155,16 @@ __instrument_class (
.control = (unsigned char *) class_name,
.classcode = class_def->class_bytes,
};
//
struct connection * conn = network_acquire_connection ();
message_send (conn, &request);
struct message response;
message_recv (conn, &response);
network_release_connection (conn);
//
// Check if error occurred on the server.
// The control field of the response contains the error message.
......@@ -178,11 +178,11 @@ __instrument_class (
exit (ERROR_SERVER);
}
//
// Update the class definition and signal modified class if
// any class code has been returned. If not, the class has
// not been modified.
// Update the class definition and signal that the class has been
// modified if non-empty class code has been returned. Otherwise,
// signal that the class has not been modified.
//
if (response.classcode_size > 0) {
class_def->class_byte_count = response.classcode_size;
......@@ -432,9 +432,9 @@ Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
.can_redefine_any_class = 1,
.can_generate_all_class_hook_events = 1,
};
jvmtiError error = (*jvmti)->AddCapabilities (jvmti, &caps);
check_jvmti_error (jvmti, error, "failed to add required JVMTI capabilities.");
check_jvmti_error (jvmti, error, "failed to add capabilities");
// configure agent and init connections
......@@ -453,7 +453,7 @@ Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
};
error = (*jvmti)->SetEventCallbacks (jvmti, &callbacks, (jint) sizeof (callbacks));
check_jvmti_error (jvmti, error, "failed to register JVMTI event callbacks");
check_jvmti_error (jvmti, error, "failed to register event callbacks");
// enable event notification
......
#ifndef _DISLAGENT_H
#define _DISLAGENT_H
#include <jvmti.h>
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved);
#ifdef __cplusplus
}
#endif
#endif /* _DISLAGENT_H */
#ifndef _DISLAGENT_H
#define _DISLAGENT_H
#include <jvmti.h>
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved);
#ifdef __cplusplus
}
#endif
#endif /* _DISLAGENT_H */
......@@ -58,7 +58,7 @@ jvmti_redefine_class (
}
//
jvmtiClassDefinition new_classdef = {
.klass = class,
.class_byte_count = class_def->class_byte_count,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment