- Implemented tcl: prefix which allows to execute a command in Tcl directly
- Fixed a stack overrun bug in macro.c - Fixed a killing bug in devser.c - Added node writing with offset to nxscript.c - Wrote a simulation driver for second generation HM's - Readded devexec commands to SICS - Readded Hipadaba initialisation to SICS - Fixed a bug in sinqhttprot.c which is triggered when a reconnect happens during a node based download of data.
This commit is contained in:
@ -35,7 +35,7 @@ static int configRequest(Ascon * a)
|
|||||||
pHttpProt pHttp = (pHttpProt) a->private;
|
pHttpProt pHttp = (pHttpProt) a->private;
|
||||||
pDynString request;
|
pDynString request;
|
||||||
char *uri = NULL;
|
char *uri = NULL;
|
||||||
char *data, *pPtr, *path;
|
char *data, *pPtr, *path, *dataCopy;
|
||||||
|
|
||||||
pHttp->node = NULL;
|
pHttp->node = NULL;
|
||||||
ghttp_clean(pHttp->request);
|
ghttp_clean(pHttp->request);
|
||||||
@ -51,21 +51,25 @@ static int configRequest(Ascon * a)
|
|||||||
DynStringConcatChar(request, '/');
|
DynStringConcatChar(request, '/');
|
||||||
data = GetCharArray(a->wrBuffer);
|
data = GetCharArray(a->wrBuffer);
|
||||||
if(strstr(data,"node:") == data){
|
if(strstr(data,"node:") == data){
|
||||||
path = strchr(data,':')+1;
|
dataCopy = strdup(data);
|
||||||
|
path = strchr(dataCopy,':')+1;
|
||||||
uri = strchr(path,':');
|
uri = strchr(path,':');
|
||||||
*uri = '\0';
|
*uri = '\0';
|
||||||
uri++;
|
uri++;
|
||||||
pHttp->node = FindHdbNode(NULL,path,pServ->dummyCon);
|
pHttp->node = FindHdbNode(NULL,path,pServ->dummyCon);
|
||||||
DynStringConcat(request,uri);
|
DynStringConcat(request,uri);
|
||||||
ghttp_set_type(pHttp->request, ghttp_type_get);
|
ghttp_set_type(pHttp->request, ghttp_type_get);
|
||||||
|
free(dataCopy);
|
||||||
} else if(strstr(data,"post:") == data){
|
} else if(strstr(data,"post:") == data){
|
||||||
uri = strchr(data,':') + 1;
|
dataCopy = strdup(data);
|
||||||
|
uri = strchr(dataCopy,':') + 1;
|
||||||
pPtr = strchr(uri,':');
|
pPtr = strchr(uri,':');
|
||||||
*pPtr = '\0';
|
*pPtr = '\0';
|
||||||
ghttp_set_type(pHttp->request, ghttp_type_post);
|
ghttp_set_type(pHttp->request, ghttp_type_post);
|
||||||
DynStringConcat(request,uri);
|
DynStringConcat(request,uri);
|
||||||
pPtr++;
|
pPtr++;
|
||||||
ghttp_set_body(pHttp->request,pPtr, strlen(pPtr));
|
ghttp_set_body(pHttp->request,strdup(pPtr), strlen(pPtr));
|
||||||
|
free(dataCopy);
|
||||||
} else {
|
} else {
|
||||||
ghttp_set_type(pHttp->request, ghttp_type_get);
|
ghttp_set_type(pHttp->request, ghttp_type_get);
|
||||||
DynStringConcat(request, GetCharArray(a->wrBuffer));
|
DynStringConcat(request, GetCharArray(a->wrBuffer));
|
||||||
@ -134,7 +138,8 @@ static void handleReply(Ascon * a)
|
|||||||
}
|
}
|
||||||
for(i = 0; i < len; i++){
|
for(i = 0; i < len; i++){
|
||||||
pHttp->node->value.v.intArray[i] = htonl(hmData[i]);
|
pHttp->node->value.v.intArray[i] = htonl(hmData[i]);
|
||||||
}
|
}
|
||||||
|
NotifyHipadabaPar(pHttp->node,NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user