346 static char date_buffer[128];
347 static char snd_buffer[
BUFSIZE+1];
348 static char snd_data_buffer[
BUFSIZE+1];
350 char node[128], server[256], service[256];
351 int pid, ret, req, browser, force;
360 strcpy(datatype,
"application/json");
375 strcpy(snd_data_buffer,
"{}");
376 ptr = snd_data_buffer;
388 strcpy(snd_data_buffer,
"{}");
389 ptr = snd_data_buffer;
402 strcpy(datatype,
"text/html");
409 strcpy(snd_data_buffer,
"{}");
410 ptr = snd_data_buffer;
423 strcpy(snd_data_buffer,
"{}");
424 ptr = snd_data_buffer;
430 strcpy(snd_data_buffer,
"");
432 strcpy(snd_data_buffer,
"load");
433 ptr = snd_data_buffer;
437 (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",
438 date_buffer, (
int)strlen(ptr), datatype);
439 (void)
web_write(conn_id,snd_buffer,(
int)strlen(snd_buffer));
441 printf(
"SENDING DATA to conn %d:\n%s\n",conn_id, snd_buffer);
442 (void)
web_write(conn_id,ptr,(
int)strlen(ptr));
444 printf(
"SENDING DATA to conn %d:\n%s\n",conn_id, ptr);
void getTime(char *buffer)
char * getJSONSmiBuffer(char *node, int browser)
char * update_smi_objects(char *node, char *server, int pid, int browser)
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)