add stub for "GetConnectionUnixProcessID"
This commit is contained in:
parent
8d5a5bec49
commit
161741d59c
1 changed files with 13 additions and 6 deletions
19
server.c
19
server.c
|
@ -365,9 +365,7 @@ int jb_server_client_process_message(struct jb_server *s, int i, uint8_t *data,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *name_str = TRYPTR(string_dup(name));
|
struct jb_client *target = jb_server_name_find_client(s, name);
|
||||||
|
|
||||||
struct jb_client *target = jb_server_name_find_client(s, name_str);
|
|
||||||
if (!target || target->unique_name_index < 0) {
|
if (!target || target->unique_name_index < 0) {
|
||||||
_reply_error("org.freedesktop.DBus.Error.NameHasNoOwner");
|
_reply_error("org.freedesktop.DBus.Error.NameHasNoOwner");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -383,9 +381,7 @@ int jb_server_client_process_message(struct jb_server *s, int i, uint8_t *data,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *name_str = TRYPTR(string_dup(name));
|
struct jb_client *target = jb_server_name_find_client(s, name);
|
||||||
|
|
||||||
struct jb_client *target = jb_server_name_find_client(s, name_str);
|
|
||||||
|
|
||||||
_reply_begin("b") {
|
_reply_begin("b") {
|
||||||
TRYPTR(wire_set_u32(&reply_ctx, target ? 1 : 0));
|
TRYPTR(wire_set_u32(&reply_ctx, target ? 1 : 0));
|
||||||
|
@ -436,6 +432,17 @@ int jb_server_client_process_message(struct jb_server *s, int i, uint8_t *data,
|
||||||
_reply_begin("u") {
|
_reply_begin("u") {
|
||||||
TRYPTR(wire_set_u32(&reply_ctx, 1));
|
TRYPTR(wire_set_u32(&reply_ctx, 1));
|
||||||
} _reply_end()
|
} _reply_end()
|
||||||
|
} else if (strcmp(member, "GetConnectionUnixProcessID") == 0) {
|
||||||
|
// TODO: stub (returns an error)
|
||||||
|
char *name = TRYPTR(wire_get_string(&ctx));
|
||||||
|
int name_len = strlen(name);
|
||||||
|
if (name_len < 1 || name_len > 256) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("FIXME: STUB: GetConnectionUnixProcessID: %s\n", name);
|
||||||
|
|
||||||
|
_reply_error("xyz.hippoz.jitterbug.NotImplemented");
|
||||||
} else if (strcmp(member, "AddMatch") == 0) {
|
} else if (strcmp(member, "AddMatch") == 0) {
|
||||||
char *match = TRYPTR(wire_get_string(&ctx));
|
char *match = TRYPTR(wire_get_string(&ctx));
|
||||||
int match_len = strlen(match);
|
int match_len = strlen(match);
|
||||||
|
|
Loading…
Reference in a new issue