cosmetics

This commit is contained in:
Jonathan Wyss 2024-09-08 17:22:28 +02:00
parent a14a2a48dd
commit 15d14d5099

18
main.c
View File

@ -27,15 +27,10 @@ typedef struct service
int main(int argc,char *argv[])
{
int i;
Service serviceSys;
//int i;
//Service serviceSys;
DBusConnection *connection=NULL;
DBusError error;
// char *result=NULL;
dbus_error_init(&error);
connection = dbus_bus_get(DBUS_BUS_SYSTEM,&error);//DBUS_BUS_SYSTEM DBUS_BUS_SESSION
@ -81,9 +76,6 @@ int main(int argc,char *argv[])
{
fprintf(stderr,"requires a command\n--\n# getSendStatus [objectpath]\n# listUnits\n#set token with GOTIFY_TOKEN=\"sjdfoiasfd\"\n--\n");
}
return 0;
}
/*interactive
@ -97,8 +89,6 @@ int main(int argc,char *argv[])
}
*/
int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check pointer of error!!
{
int ret=0,i=0;
@ -140,6 +130,7 @@ int DBusOptions(DBusConnection *connection,DBusError **error) //not tested check
}
return 0;
}
int GetSendStatus(DBusConnection *connection,char *objectpath)
{
char *result=0;
@ -170,7 +161,6 @@ int checkState(char *ServiceName,char *result)
return 1;
}
int gotify_message(char *url,char *title,char *message)
{
int ret;
@ -354,7 +344,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p
DBusMessageIter variant_iter;
DBusMessageIter sub_iter;
int ret3;
char *reply_msg=NULL;
int ret1,ret2;
char *param2 = "org.freedesktop.systemd1.Unit";
@ -371,7 +360,6 @@ int systemdUnitCall(DBusConnection *connection,char *target,char *method,char *p
{
printf("message created!\n");
}
if(param2 != NULL)
{