Commit b66695a6 authored by Claes Sjofors's avatar Claes Sjofors

QCom put.allocate added

parent 91002187
...@@ -326,6 +326,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Qcom_putString ...@@ -326,6 +326,7 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Qcom_putString
data = (*env)->GetStringUTFChars( env, jdata, 0); data = (*env)->GetStringUTFChars( env, jdata, 0);
cstr = (char *)data; cstr = (char *)data;
put.data = (char *)data; put.data = (char *)data;
put.allocate = 1;
put.size = strlen(data) + 1; put.size = strlen(data) + 1;
put.type.b = qcom_eBtype__; put.type.b = qcom_eBtype__;
put.type.s = qcom_eStype__; put.type.s = qcom_eStype__;
......
...@@ -174,6 +174,7 @@ unsigned int qcom_send(remnode_item *remnode, ...@@ -174,6 +174,7 @@ unsigned int qcom_send(remnode_item *remnode,
memset( &put, 0, sizeof(put)); memset( &put, 0, sizeof(put));
put.data = buf; put.data = buf;
put.allocate = 1;
put.size = buf_size; put.size = buf_size;
put.type.b = remote_cMsgClass; put.type.b = remote_cMsgClass;
put.type.s = remtrans->Address[0]; put.type.s = remtrans->Address[0];
......
...@@ -59,6 +59,7 @@ pwr_tStatus remote_logg( int identity, char *str, int size) ...@@ -59,6 +59,7 @@ pwr_tStatus remote_logg( int identity, char *str, int size)
strncat( &logmsg[4], str, size+1); strncat( &logmsg[4], str, size+1);
put.data = logmsg; put.data = logmsg;
put.allocate = 1;
put.size = logsize; put.size = logsize;
put.type.b = qcom_eBtype__; put.type.b = qcom_eBtype__;
put.type.s = qcom_eStype__; put.type.s = qcom_eStype__;
......
...@@ -209,6 +209,7 @@ void RemTrans_Logg(remtrans_item *remtrans) ...@@ -209,6 +209,7 @@ void RemTrans_Logg(remtrans_item *remtrans)
/* Send to Logg-job */ /* Send to Logg-job */
put.data = dynp; put.data = dynp;
put.allocate = 1;
put.size = size; put.size = size;
put.type.b = qcom_eBtype__; put.type.b = qcom_eBtype__;
put.type.s = qcom_eStype__; put.type.s = qcom_eStype__;
......
...@@ -188,6 +188,7 @@ static pwr_tStatus stop ( ...@@ -188,6 +188,7 @@ static pwr_tStatus stop (
put.reply.qix = 0; put.reply.qix = 0;
put.reply.nid = 0; put.reply.nid = 0;
put.data = data; put.data = data;
put.allocate = 1;
put.size = sizeof(data) + 1; put.size = sizeof(data) + 1;
qcom_Put(&sts, &qid, &put); qcom_Put(&sts, &qid, &put);
......
...@@ -219,6 +219,7 @@ int sev_server::connect() ...@@ -219,6 +219,7 @@ int sev_server::connect()
msg->Type = sev_eMsgType_NodeUp; msg->Type = sev_eMsgType_NodeUp;
put.data = msg; put.data = msg;
put.allocate = 0;
if ( !qcom_Put( &sts, &tgt, &put)) { if ( !qcom_Put( &sts, &tgt, &put)) {
qcom_Free( &sts, put.data); qcom_Free( &sts, put.data);
...@@ -253,6 +254,7 @@ int sev_server::request_items( pwr_tNid nid) ...@@ -253,6 +254,7 @@ int sev_server::request_items( pwr_tNid nid)
msg->Type = sev_eMsgType_HistItemsRequest; msg->Type = sev_eMsgType_HistItemsRequest;
put.data = msg; put.data = msg;
put.allocate = 0;
if ( !qcom_Put( &sts, &tgt, &put)) { if ( !qcom_Put( &sts, &tgt, &put)) {
qcom_Free( &sts, put.data); qcom_Free( &sts, put.data);
...@@ -286,6 +288,7 @@ int sev_server::send_itemlist( qcom_sQid tgt) ...@@ -286,6 +288,7 @@ int sev_server::send_itemlist( qcom_sQid tgt)
put.size = size; put.size = size;
put.data = qcom_Alloc(&lsts, put.size); put.data = qcom_Alloc(&lsts, put.size);
put.allocate = 0;
((sev_sMsgHistItems *)put.data)->Type = sev_eMsgType_HistItems; ((sev_sMsgHistItems *)put.data)->Type = sev_eMsgType_HistItems;
...@@ -341,6 +344,7 @@ int sev_server::send_server_status( qcom_sQid tgt) ...@@ -341,6 +344,7 @@ int sev_server::send_server_status( qcom_sQid tgt)
put.size = sizeof(sev_sMsgServerStatus); put.size = sizeof(sev_sMsgServerStatus);
put.data = qcom_Alloc(&lsts, put.size); put.data = qcom_Alloc(&lsts, put.size);
put.allocate = 0;
((sev_sMsgServerStatus *)put.data)->Type = sev_eMsgType_ServerStatus; ((sev_sMsgServerStatus *)put.data)->Type = sev_eMsgType_ServerStatus;
...@@ -376,6 +380,7 @@ int sev_server::delete_item( qcom_sQid tgt, sev_sMsgHistItemDelete *rmsg) ...@@ -376,6 +380,7 @@ int sev_server::delete_item( qcom_sQid tgt, sev_sMsgHistItemDelete *rmsg)
put.size = sizeof(sev_sMsgHistItemStatus); put.size = sizeof(sev_sMsgHistItemStatus);
put.data = qcom_Alloc(&lsts, put.size); put.data = qcom_Alloc(&lsts, put.size);
put.allocate = 0;
m_db->delete_item( &sts, rmsg->Oid, rmsg->AName); m_db->delete_item( &sts, rmsg->Oid, rmsg->AName);
...@@ -809,6 +814,7 @@ int sev_server::send_histdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *rmsg, ...@@ -809,6 +814,7 @@ int sev_server::send_histdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *rmsg,
msg = (sev_sMsgHistDataGet *) qcom_Alloc(&lsts, put.size); msg = (sev_sMsgHistDataGet *) qcom_Alloc(&lsts, put.size);
put.data = msg; put.data = msg;
put.allocate = 0;
msg->Type = sev_eMsgType_HistDataGet; msg->Type = sev_eMsgType_HistDataGet;
msg->Oid = rmsg->Oid; msg->Oid = rmsg->Oid;
...@@ -867,6 +873,7 @@ int sev_server::send_objecthistdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest * ...@@ -867,6 +873,7 @@ int sev_server::send_objecthistdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *
msg = (sev_sMsgHistObjectDataGet *) qcom_Alloc(&lsts, put.size); msg = (sev_sMsgHistObjectDataGet *) qcom_Alloc(&lsts, put.size);
put.data = msg; put.data = msg;
put.allocate = 0;
msg->Type = sev_eMsgType_HistObjectDataGet; msg->Type = sev_eMsgType_HistObjectDataGet;
msg->Oid = rmsg->Oid; msg->Oid = rmsg->Oid;
......
...@@ -346,6 +346,7 @@ int main (int argc, char **argv) ...@@ -346,6 +346,7 @@ int main (int argc, char **argv)
put.type.s = alimsrv_eSubType_Answer; put.type.s = alimsrv_eSubType_Answer;
put.reply = myQId; put.reply = myQId;
put.data = (char *) bp; put.data = (char *) bp;
put.allocate = 1;
put.size = size; put.size = size;
if (!qcom_Reply(&sts, &get, &put)) if (!qcom_Reply(&sts, &get, &put))
......
...@@ -1060,6 +1060,7 @@ applReply ( ...@@ -1060,6 +1060,7 @@ applReply (
put.type.s = mh_eMsg_ApplReply; put.type.s = mh_eMsg_ApplReply;
put.reply = l.head.qid; put.reply = l.head.qid;
put.size = size; put.size = size;
put.allocate = 0;
qcom_Reply(&sts, get, &put); qcom_Reply(&sts, get, &put);
if (EVEN(sts)) { if (EVEN(sts)) {
...@@ -1218,7 +1219,7 @@ aSup_exec ( ...@@ -1218,7 +1219,7 @@ aSup_exec (
if (!o->Action) { if (!o->Action) {
o->Action = TRUE; o->Action = TRUE;
} }
if (o->Supressed) { if (o->Suppressed) {
if (o->ReturnCheck) { if (o->ReturnCheck) {
time_GetTime( &o->ReturnTime); time_GetTime( &o->ReturnTime);
o->ReturnCheck = FALSE; o->ReturnCheck = FALSE;
...@@ -1227,7 +1228,7 @@ aSup_exec ( ...@@ -1227,7 +1228,7 @@ aSup_exec (
else if (o->DetectSend) else if (o->DetectSend)
o->DetectSend = FALSE; o->DetectSend = FALSE;
} }
if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Supressed) { if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Suppressed) {
if (o->DetectCheck) { if (o->DetectCheck) {
o->ActualValue = In; o->ActualValue = In;
timerIn(sp, (sTimer *)&o->TimerFlag); timerIn(sp, (sTimer *)&o->TimerFlag);
...@@ -1514,7 +1515,7 @@ dSup_exec ( ...@@ -1514,7 +1515,7 @@ dSup_exec (
if (!o->Action) { if (!o->Action) {
o->Action = TRUE; o->Action = TRUE;
} }
if (o->Supressed) { if (o->Suppressed) {
if (o->ReturnCheck) { if (o->ReturnCheck) {
time_GetTime( &o->ReturnTime); time_GetTime( &o->ReturnTime);
o->ReturnCheck = FALSE; o->ReturnCheck = FALSE;
...@@ -1523,7 +1524,7 @@ dSup_exec ( ...@@ -1523,7 +1524,7 @@ dSup_exec (
else if (o->DetectSend) else if (o->DetectSend)
o->DetectSend = FALSE; o->DetectSend = FALSE;
} }
if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Supressed) { if (o->AlarmCheck && o->DetectOn && !o->Blocked && !o->Suppressed) {
if (o->DetectCheck) { if (o->DetectCheck) {
o->ActualValue = In; o->ActualValue = In;
timerIn(sp, (sTimer *)&o->TimerFlag); timerIn(sp, (sTimer *)&o->TimerFlag);
......
...@@ -313,11 +313,13 @@ interactive ( ...@@ -313,11 +313,13 @@ interactive (
qid.qix = 550715; qid.qix = 550715;
qid.nid = 0; qid.nid = 0;
put.type.b = 10; put.type.b = 10;
put.type.s = 1; put.type.s = 1;
put.reply = cp->myQ; put.reply = cp->myQ;
put.data = bp; put.data = bp;
put.size = totlen; put.size = totlen;
put.allocate = 1;
qcom_Put(&sts, &qid, &put); qcom_Put(&sts, &qid, &put);
while (1) { while (1) {
...@@ -382,12 +384,13 @@ stop ( ...@@ -382,12 +384,13 @@ stop (
qid.qix = 550715; qid.qix = 550715;
qid.nid = 0; qid.nid = 0;
put.type.b = 11; put.type.b = 11;
put.type.s = 1; put.type.s = 1;
put.reply.qix = 0; put.reply.qix = 0;
put.reply.nid = 0; put.reply.nid = 0;
put.data = data; put.data = data;
put.size = sizeof(data) + 1; put.size = sizeof(data) + 1;
put.allocate = 1;
qcom_Put(&sts, &qid, &put); qcom_Put(&sts, &qid, &put);
// while (1) { // while (1) {
......
...@@ -864,6 +864,7 @@ nodeUp ( ...@@ -864,6 +864,7 @@ nodeUp (
put.type.s = net_eMsg_nodeUp; put.type.s = net_eMsg_nodeUp;
put.reply = qcom_cNQid; put.reply = qcom_cNQid;
put.data = (char *)ν put.data = (char *)ν
put.allocate = 1;
put.size = sizeof(nu); put.size = sizeof(nu);
qcom_Put(&sts, &qcom_cQnacp, &put); qcom_Put(&sts, &qcom_cQnacp, &put);
......
...@@ -2620,6 +2620,7 @@ void send_state_change() ...@@ -2620,6 +2620,7 @@ void send_state_change()
} }
put.size = 4; put.size = 4;
put.data = qcom_Alloc( &sts, put.size); put.data = qcom_Alloc( &sts, put.size);
put.allocate = 0;
qcom_Put( &sts, &qmon_qid, &put); qcom_Put( &sts, &qmon_qid, &put);
......
...@@ -666,6 +666,7 @@ int rt_sevhistmon::send_data() ...@@ -666,6 +666,7 @@ int rt_sevhistmon::send_data()
put.size = msize; put.size = msize;
put.data = msg; put.data = msg;
put.allocate = 0;
msg->Type = sev_eMsgType_HistDataStore; msg->Type = sev_eMsgType_HistDataStore;
time_GetTime( &current_time); time_GetTime( &current_time);
...@@ -813,6 +814,7 @@ bool rt_sevhistmon::send_connect( pwr_tNid nid, pwr_tStatus *sts) ...@@ -813,6 +814,7 @@ bool rt_sevhistmon::send_connect( pwr_tNid nid, pwr_tStatus *sts)
put.size = sizeof(*msg); put.size = sizeof(*msg);
msg = (sev_sMsgAny *) qcom_Alloc(&lsts, put.size); msg = (sev_sMsgAny *) qcom_Alloc(&lsts, put.size);
put.data = msg; put.data = msg;
put.allocate = 0;
msg->Type = sev_eMsgType_NodeUp; msg->Type = sev_eMsgType_NodeUp;
...@@ -864,6 +866,7 @@ bool rt_sevhistmon::send_server_status_request( pwr_tNid nid, pwr_tStatus *sts) ...@@ -864,6 +866,7 @@ bool rt_sevhistmon::send_server_status_request( pwr_tNid nid, pwr_tStatus *sts)
put.size = sizeof(*msg); put.size = sizeof(*msg);
msg = (sev_sMsgAny *) qcom_Alloc(&lsts, put.size); msg = (sev_sMsgAny *) qcom_Alloc(&lsts, put.size);
put.data = msg; put.data = msg;
put.allocate = 0;
msg->Type = sev_eMsgType_NodeUp; msg->Type = sev_eMsgType_NodeUp;
...@@ -940,6 +943,7 @@ int rt_sevhistmon::send_itemlist( pwr_tNid nid) ...@@ -940,6 +943,7 @@ int rt_sevhistmon::send_itemlist( pwr_tNid nid)
put.size = size; put.size = size;
put.data = qcom_Alloc(&lsts, put.size); put.data = qcom_Alloc(&lsts, put.size);
put.allocate = 0;
((sev_sMsgHistItems *)put.data)->Type = sev_eMsgType_HistItems; ((sev_sMsgHistItems *)put.data)->Type = sev_eMsgType_HistItems;
((sev_sMsgHistItems *)put.data)->Status = SEV__SUCCESS; ((sev_sMsgHistItems *)put.data)->Status = SEV__SUCCESS;
...@@ -1262,6 +1266,7 @@ void sev_sevhistevents::evbuf_send() ...@@ -1262,6 +1266,7 @@ void sev_sevhistevents::evbuf_send()
put.size = sizeof(sev_sMsgEventsStore) + (num - 1) * sizeof(sev_sEvent); put.size = sizeof(sev_sMsgEventsStore) + (num - 1) * sizeof(sev_sEvent);
put.data = qcom_Alloc(&sts, put.size); put.data = qcom_Alloc(&sts, put.size);
put.allocate = 0;
((sev_sMsgEventsStore *)put.data)->Type = sev_eMsgType_EventsStore; ((sev_sMsgEventsStore *)put.data)->Type = sev_eMsgType_EventsStore;
((sev_sMsgEventsStore *)put.data)->Oid = monitor->m_sevhistevents->hs_oid; ((sev_sMsgEventsStore *)put.data)->Oid = monitor->m_sevhistevents->hs_oid;
......
...@@ -375,6 +375,7 @@ sendAndReceive ( ...@@ -375,6 +375,7 @@ sendAndReceive (
put.reply.qix = 0; put.reply.qix = 0;
put.reply.nid = 0; put.reply.nid = 0;
put.size = size; put.size = size;
put.allocate = 0;
get.data = NULL; get.data = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment