Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
9d91567c
Vérifiée
Valider
9d91567c
rédigé
8 mai 2020
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Try to fix lkt and lktadm
parent
4bae8d4a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!75
Resolve "Stickers in lkt"
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/main/lkt.c
+13
-13
13 ajouts, 13 suppressions
src/main/lkt.c
src/main/lktadm.c
+1
-1
1 ajout, 1 suppression
src/main/lktadm.c
avec
14 ajouts
et
14 suppressions
src/main/lkt.c
+
13
−
13
Voir le fichier @
9d91567c
...
@@ -175,12 +175,12 @@ send_cmd_with_uri(FILE *sock, char *cmd, int argc, const char **argv)
...
@@ -175,12 +175,12 @@ send_cmd_with_uri(FILE *sock, char *cmd, int argc, const char **argv)
fail_if(args->argc, "This command takes no arguments"); \
fail_if(args->argc, "This command takes no arguments"); \
lkt_send_and_exit(msg, sizeof(msg)); \
lkt_send_and_exit(msg, sizeof(msg)); \
}
}
just_send
(
queue_clear__
,
"clear
\
n
close
\
n
"
)
just_send
(
queue_clear__
,
"clear
\n
"
)
just_send
(
queue_crop__
,
"crop
\
n
close
\
n
"
)
just_send
(
queue_crop__
,
"crop
\n
"
)
just_send
(
next__
,
"next
\
n
close
\
n
"
)
just_send
(
next__
,
"next
\n
"
)
just_send
(
prev__
,
"previous
\
n
close
\
n
"
)
just_send
(
prev__
,
"previous
\n
"
)
just_send
(
stop__
,
"stop
\
n
close
\
n
"
)
just_send
(
stop__
,
"stop
\n
"
)
just_send
(
shuffle__
,
"shuffle
\n
play
\
n
close
\
n
"
)
just_send
(
shuffle__
,
"shuffle
\n
play
\n
"
)
#undef just_send
#undef just_send
noreturn
void
noreturn
void
...
@@ -188,7 +188,7 @@ simple_send_with_password__(const char *cmd)
...
@@ -188,7 +188,7 @@ simple_send_with_password__(const char *cmd)
{
{
if
(
!
password
)
if
(
!
password
)
fail
(
"Password not provided"
);
fail
(
"Password not provided"
);
static
const
char
cmd__
[]
=
"password %s
\n
%s
\
n
close
\
n
"
;
static
const
char
cmd__
[]
=
"password %s
\n
%s
\n
"
;
FILE
*
sock
=
lkt_connect
();
FILE
*
sock
=
lkt_connect
();
write_socket
(
sock
,
cmd__
,
password
,
cmd
);
write_socket
(
sock
,
cmd__
,
password
,
cmd
);
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
...
@@ -257,9 +257,9 @@ play__(struct lkt_cmd_args *args)
...
@@ -257,9 +257,9 @@ play__(struct lkt_cmd_args *args)
pos
=
atoi
(
args
->
argv
[
0
]);
pos
=
atoi
(
args
->
argv
[
0
]);
static
const
char
status__
[]
=
"status
\n
"
;
static
const
char
status__
[]
=
"status
\n
"
;
static
const
char
cmd_play__
[]
=
"play
\
n
close
\
n
"
;
static
const
char
cmd_play__
[]
=
"play
\n
"
;
static
const
char
cmd_play_from__
[]
=
"play %d
\
n
close
\
n
"
;
static
const
char
cmd_play_from__
[]
=
"play %d
\n
"
;
static
const
char
cmd_pause__
[]
=
"pause
\
n
close
\
n
"
;
static
const
char
cmd_pause__
[]
=
"pause
\n
"
;
char
buff
[
LKT_MESSAGE_MAX
];
char
buff
[
LKT_MESSAGE_MAX
];
FILE
*
sock
=
lkt_connect
();
FILE
*
sock
=
lkt_connect
();
...
@@ -297,11 +297,11 @@ ping__(struct lkt_cmd_args *args)
...
@@ -297,11 +297,11 @@ ping__(struct lkt_cmd_args *args)
fail
(
"Invalid argument, the ping command takes no arguments"
);
fail
(
"Invalid argument, the ping command takes no arguments"
);
char
buff
[
6
]
=
{
0
};
char
buff
[
6
]
=
{
0
};
FILE
*
sock
=
lkt_connect
();
FILE
*
sock
=
lkt_connect
();
write_socket
(
sock
,
"ping
\
n
close
\
n
"
);
write_socket
(
sock
,
"ping
\n
"
);
read_socket
(
sock
,
buff
,
6
*
sizeof
(
char
));
read_socket
(
sock
,
buff
,
6
*
sizeof
(
char
));
if
(
!
STR_NMATCH
(
buff
,
"OK"
,
2
))
if
(
!
STR_NMATCH
(
buff
,
"OK"
,
2
))
fail
(
"ACK"
);
fail
(
"ACK"
);
exit
(
write
(
1
,
"OK
\n
"
,
sizeof
(
"OK
\n
"
))
>
0
);
exit
(
write
(
1
,
"OK
\n
"
,
sizeof
(
"OK
\n
"
))
==
0
);
}
}
noreturn
void
noreturn
void
...
@@ -485,7 +485,7 @@ queue_delete__(struct lkt_cmd_args *args)
...
@@ -485,7 +485,7 @@ queue_delete__(struct lkt_cmd_args *args)
if
(
args
->
argc
!=
1
)
if
(
args
->
argc
!=
1
)
fail
(
"Invalid argument, need onlt one argument: queue delete <id>"
);
fail
(
"Invalid argument, need onlt one argument: queue delete <id>"
);
static
const
char
*
cmd_id__
=
"deleteid %d
\
n
close
\
n
"
;
static
const
char
*
cmd_id__
=
"deleteid %d
\n
"
;
int
dumy
=
0
;
int
dumy
=
0
;
FILE
*
sock
=
lkt_connect
();
FILE
*
sock
=
lkt_connect
();
char
buff
[
3
];
char
buff
[
3
];
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/main/lktadm.c
+
1
−
1
Voir le fichier @
9d91567c
...
@@ -25,7 +25,7 @@ fail(const char *format, ...)
...
@@ -25,7 +25,7 @@ fail(const char *format, ...)
va_start
(
ap
,
format
);
va_start
(
ap
,
format
);
vfprintf
(
stderr
,
format
,
ap
);
vfprintf
(
stderr
,
format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
exit
(
write
(
2
,
"
\n
"
,
1
)
>
0
);
exit
(
write
(
2
,
"
\n
"
,
1
)
==
0
);
}
}
/* ----------------- *
/* ----------------- *
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter