Skip to content
Snippets Groups Projects
Commit e8da45b3 authored by Steven Murray's avatar Steven Murray
Browse files

Removed the unused function vdqm_SendToRTCP().

parent d1ec1b54
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,6 @@ int vdqm_CleanUp (vdqmnw_t *,int);
int vdqm_ConnectToVDQM (vdqmnw_t **, char *);
int vdqm_CloseConn (vdqmnw_t *);
int vdqm_ConnectToRTCP (int *, char *);
int vdqm_SendToRTCP (int, vdqmVolReq_t *, vdqmDrvReq_t *);
int vdqm_GetRTCPReq (char *, vdqmVolReq_t *, vdqmDrvReq_t *);
int vdqm_SendRTCPAckn (int, int *, int *, char *);
int vdqm_GetRTCPPort (void);
......
......@@ -465,77 +465,6 @@ int vdqm_SendRTCPAckn(int connect_socket,
return(rc);
}
int vdqm_SendToRTCP(int connect_socket, vdqmVolReq_t *VolReq,
vdqmDrvReq_t *DrvReq) {
char buf[VDQM_MSGBUFSIZ];
char errmsg[1024];
char *p;
int len,msglen,rc,magic,reqtype,status;
if ( VolReq == NULL || DrvReq == NULL ) return(-1);
p = buf;
len = vdqm_MarshallRTCPReq(p,VolReq,DrvReq,SendTo);
rc = netwrite_timeout(connect_socket,buf,len,VDQM_TIMEOUT);
switch (rc) {
case -1:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netwrite() %s\n",neterror());
serrno = SECOMERR;
return(-1);
case 0:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netwrite() connection dropped\n");
serrno = SECONNDROP;
return(-1);
}
rc = netread_timeout(connect_socket,buf,LONGSIZE*3,VDQM_TIMEOUT);
switch (rc) {
case -1:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netread(HDR) %s\n",neterror());
serrno = SECOMERR;
return(-1);
case 0:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netread(HDR) connection dropped\n");
serrno = SECONNDROP;
return(-1);
}
p = buf;
unmarshall_LONG(p,magic);
unmarshall_LONG(p,reqtype);
unmarshall_LONG(p,len);
rc = 0;
if ( len > 0 ) {
if ( len > VDQM_MSGBUFSIZ - 3*LONGSIZE ) {
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP() too large errmsg buffer requested %d (%d)\n",
len,VDQM_MSGBUFSIZ-3*LONGSIZE);
len = VDQM_MSGBUFSIZ - 3*LONGSIZE;
}
rc = netread_timeout(connect_socket,p,len,VDQM_TIMEOUT);
switch (rc) {
case -1:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netread(REQ) %s\n",neterror());
serrno = SECOMERR;
return(-1);
case 0:
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): netread(REQ) connection dropped\n");
serrno = SECONNDROP;
return(-1);
}
/*
* Acknowledge message
*/
msglen = 1024;
p = buf;
*errmsg = '\0';
status = 0;
rc = vdqm_MarshallRTCPAckn(p,&status,&msglen,errmsg,ReceiveFrom);
if ( msglen > 0 ) {
(*logfunc)(LOG_ERR,"vdqm_SendToRTCP(): rtcopyd returned %d, %s\n",
status,errmsg);
}
}
return(rc);
}
int vdqm_SendVolPriority_Transfer(vdqmnw_t *nw, vdqmVolPriority_t *volpriority)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment