Changeset 16903
- Timestamp:
- Mar 9, 2008, 11:05:49 AM (18 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 3 added
- 5 edited
-
lib.shell/multicommand.c (modified) (3 diffs)
-
pantasks/ListenClients.c (modified) (1 diff)
-
pantasks/Makefile (modified) (1 diff)
-
pantasks/init_client.c (modified) (1 diff)
-
pantasks/init_server.c (modified) (2 diffs)
-
pantasks/server_connect.c (added)
-
pantasks/server_disconnect.c (added)
-
pantasks/server_shutdown.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/multicommand.c
r16472 r16903 3 3 static int server = 0; 4 4 static int bufferPending = FALSE; 5 6 int getServer () { 7 return (server); 8 } 5 9 6 10 // XXX this is rather pantasks-specific... … … 28 32 SendCommand (server, strlen(PASSWORD), PASSWORD); 29 33 34 return; 35 } 36 37 // close connection with remote server 38 void multicommand_StopServer () { 39 40 if (!server) return; 41 close (server); 42 server = 0; 30 43 return; 31 44 } … … 58 71 if (bufferPending) { 59 72 // flush old messages 60 while (ExpectMessage (server, 0.2, &message));73 ExpectMessage (server, 0.2, &message); 61 74 bufferPending = FALSE; 62 75 } -
trunk/Ohana/src/opihi/pantasks/ListenClients.c
r15791 r16903 1 1 # include "pantasks.h" 2 # define DEBUG 02 # define DEBUG 1 3 3 4 4 static int NCLIENTS; -
trunk/Ohana/src/opihi/pantasks/Makefile
r13540 r16903 23 23 $(SRC)/client_shell.$(ARCH).o \ 24 24 $(SRC)/invalid.$(ARCH).o \ 25 $(SRC)/server_shutdown.$(ARCH).o \ 26 $(SRC)/server_disconnect.$(ARCH).o \ 27 $(SRC)/server_connect.$(ARCH).o \ 25 28 $(SRC)/init_client.$(ARCH).o 26 29 -
trunk/Ohana/src/opihi/pantasks/init_client.c
r16453 r16903 1 1 # include "pantasks.h" 2 2 3 int invalid PROTO((int, char **)); 3 int invalid PROTO((int, char **)); 4 int server_shutdown PROTO((int, char **)); 5 int server_disconnect PROTO((int, char **)); 6 int server_connect PROTO((int, char **)); 4 7 5 /* we list here commands which are not valid for the client,6 but represent valid pantasks commands. these are caught7 by the client and sent to the 'invalid'function */8 /* we also list here commands which are not valid for the client, but represent valid 9 pantasks commands. these are caught by the client and sent to the 'invalid' 10 function */ 8 11 9 12 static Command cmds[] = { 10 {1, "task", invalid, "define a schedulable task"}, 11 {1, "task.exit", invalid, "define exit macros for a task"}, 12 {1, "task.exec", invalid, "define pre-exec macro for a task"}, 13 {1, "task", invalid, "define a schedulable task"}, 14 {1, "task.exit", invalid, "define exit macros for a task"}, 15 {1, "task.exec", invalid, "define pre-exec macro for a task"}, 16 17 {1, "shutdown", server_shutdown, "send exit signal to server"}, 18 {1, "disconnect", server_disconnect, "close connection to server"}, 19 {1, "connect", server_connect, "open connection to server"}, 20 13 21 }; 14 22 -
trunk/Ohana/src/opihi/pantasks/init_server.c
r16453 r16903 25 25 int ipptool2book PROTO((int, char **)); 26 26 27 int server_run PROTO((int, char **)); 28 int server_stop PROTO((int, char **)); 29 int server_halt PROTO((int, char **)); 30 27 31 static Command cmds[] = { 28 32 {1, "active", task_active, "set the active state of a task"}, … … 50 54 {1, "verbose", verbose, "set/toggle verbose mode"}, 51 55 {1, "version", version, "show version information"}, 56 57 {1, "run", server_run, "run scheduler"}, 58 {1, "stop", server_stop, "stop scheduler"}, 59 {1, "halt", server_halt, "halt scheduler"}, 52 60 }; 53 61
Note:
See TracChangeset
for help on using the changeset viewer.
