const char *e;
e = object_path_startswith(node, prefix);
- if (e)
+ if (e && e[0])
fprintf(i->f, " <node name=\"%s\"/>\n", e);
free(node);
fprintf(i->f, " <arg type=\"%.*s\"", (int) l, signature);
if (direction)
- fprintf(i->f, " direction=\"%s\">\n", direction);
+ fprintf(i->f, " direction=\"%s\"/>\n", direction);
else
- fputs(">\n", i->f);
+ fputs("/>\n", i->f);
signature += l;
}
break;
case _SD_BUS_VTABLE_METHOD:
- fprintf(i->f, " <method name=\"%s\">\n", v->method.member);
- introspect_write_arguments(i, v->method.signature, "in");
- introspect_write_arguments(i, v->method.result, "out");
+ fprintf(i->f, " <method name=\"%s\">\n", v->x.method.member);
+ introspect_write_arguments(i, strempty(v->x.method.signature), "in");
+ introspect_write_arguments(i, strempty(v->x.method.result), "out");
introspect_write_flags(i, v->type, v->flags);
fputs(" </method>\n", i->f);
break;
case _SD_BUS_VTABLE_PROPERTY:
case _SD_BUS_VTABLE_WRITABLE_PROPERTY:
fprintf(i->f, " <property name=\"%s\" type=\"%s\" access=\"%s\">\n",
- v->property.member,
- v->property.signature,
+ v->x.property.member,
+ v->x.property.signature,
v->type == _SD_BUS_VTABLE_WRITABLE_PROPERTY ? "readwrite" : "read");
introspect_write_flags(i, v->type, v->flags);
fputs(" </property>\n", i->f);
break;
case _SD_BUS_VTABLE_SIGNAL:
- fprintf(i->f, " <signal name=\"%s\">\n", v->signal.member);
- introspect_write_arguments(i, v->signal.signature, NULL);
+ fprintf(i->f, " <signal name=\"%s\">\n", v->x.signal.member);
+ introspect_write_arguments(i, strempty(v->x.signal.signature), NULL);
introspect_write_flags(i, v->type, v->flags);
fputs(" </signal>\n", i->f);
break;