X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Fmain.c;h=720fd1a29de98395e45a04ea753667a6c81cdc14;hb=c518754bec4758cce7d899463f9c68612c3bf4e4;hp=9de18bc54c3b03997797b8d4d9ce57dad5296123;hpb=32ff545d18253da21f25c69c6d99b96f90668773;p=mTask.git diff --git a/client/main.c b/client/main.c index 9de18bc..720fd1a 100644 --- a/client/main.c +++ b/client/main.c @@ -20,6 +20,7 @@ #define MSG_SDS_SPEC 's' #define MSG_SDS_DEL 'a' #define MSG_SDS_UPD 'u' +#define MSG_SPEC 'c' void read_message(void) { @@ -49,7 +50,12 @@ void read_message(void) debug("Receiving a task"); task_register(); break; + case MSG_SPEC: + debug("Receiving a spec request"); + spec_send(); + break; case '\0': + debug("Server closed connection"); break; case '\n': break; @@ -106,7 +112,6 @@ int main(int argc, char *argv[]){ sds_init(); task_init(); debug("sending device spec"); - spec_send(); while(true){ //Check for newetasks loop();