242 static char date_buffer[128];
243 static char snd_buffer[
BUFSIZE+1];
244 static char snd_data_buffer[
BUFSIZE+1];
246 char node[128], server[256], service[256];
247 int pid, ret, req, browser, force;
256 strcpy(datatype,
"application/json");
271 strcpy(snd_data_buffer,
"{}");
272 ptr = snd_data_buffer;
284 strcpy(snd_data_buffer,
"{}");
285 ptr = snd_data_buffer;
298 strcpy(datatype,
"text/html");
305 strcpy(snd_data_buffer,
"{}");
306 ptr = snd_data_buffer;
319 strcpy(snd_data_buffer,
"{}");
320 ptr = snd_data_buffer;
326 strcpy(snd_data_buffer,
"");
328 strcpy(snd_data_buffer,
"load");
329 ptr = snd_data_buffer;
333 (void)
sprintf(snd_buffer,
"HTTP/1.1 200 OK\r\nDate: %s\r\nServer: DID/19.7\r\nContent-Length: %d\r\nContent-Type: %s\r\nConnection: close\r\n\r\n",
334 date_buffer, (
int)strlen(ptr), datatype);
335 (void)
web_write(conn_id,snd_buffer,(
int)strlen(snd_buffer));
337 printf(
"SENDING DATA to conn %d:\n%s\n",conn_id, snd_buffer);
338 (void)
web_write(conn_id,ptr,(
int)strlen(ptr));
340 printf(
"SENDING DATA to conn %d:\n%s\n",conn_id, ptr);
void getTime(char *buffer)
int getNodeParameters(char *buffer, char *node, int *browser)
int getServiceParameters(char *buffer, char *service, int *req, int *browser, int *force)
int getServerParameters(char *buffer, char *node, char *server, int *pid, int *browser)
static char * conv_buffer
char * getJSONBuffer(char *node, int browser)
int check_browser_changes()
sprintf(name1,"NewService%d", i)
char * getJSONHeader(int isSMI)
int update_service_data(char *service, int conn_id, int subscribe, int req, int browser, int force)