shares are dynamically allocated as well:)
[mTask.git] / client / client.c
index ce1d1f2..869d026 100644 (file)
@@ -37,11 +37,16 @@ void read_message(void)
                case MSG_SDS_UPD:
                        debug("Receiving an sds update");
                        //TODO do something with the return value
-                       sds_update();
+                       c = read16();
+                       sds_update(c);
                        break;
                case MSG_SDS_DEL:
                        debug("Receiving a delete SDS request");
-                       sds_delete();
+                       c = read16();
+                       sds_delete(c);
+                       write_byte('a');
+                       write16(c);
+                       write_byte('\n');
                        break;
                case MSG_DEL_TASK:
                        debug("Receiving a delete task request");
@@ -117,11 +122,8 @@ int main(int argc, char *argv[]){
        gargv = argv;
 #endif
 
-       //Initialize systems
+       //Initialize device independant functionality
        real_setup();
-       sds_init();
-       task_init();
-       debug("sending device spec");
 
 #ifndef ARDUINO_ESP8266_NODEMCU
        while(true){