Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Task-to-Task communications
@ 1993-09-23 19:16 Ron Loxton
  1993-09-24  6:06 ` jeh
  0 siblings, 1 reply; 2+ messages in thread
From: Ron Loxton @ 1993-09-23 19:16 UTC (permalink / raw)


Netters:

	I am attempting to perform task-to-task communication between a
Vax running 
Pathworks V4.1 and my PC over decnet. I can send data from the VAX task
to my PC task
but not the other way (I get a symbolic stack dump).

Any help would be appreciated.

Please mail any suggestions to me personally

loxtonr@gov.on.ca

Thx

Ron Loxton

=============================================
Server Source:
#include <stdio.h>

FILE *TaskConnection;
char *pInputBuffer;
main()
  {
  if ((TaskConnection = fopen("SYS$NET","r+")) == NULL)   /* Open for
read+write */
    {
    puts("Cannot open network connection");
    exit(1);
    }
  puts("Connection openned");
  if (fputs("Hello There...",TaskConnection) == EOF)
    {
    puts("Connection has been closed");
    return(-1);
    }
  puts("Data Sent");
  puts("Waiting for Data from client...");
  if(fgets(pInputBuffer,100,TaskConnection)== NULL)
    {
    puts("Error Reading Line");
    }
  puts("Data Received...");
  printf("Received: %s",pInputBuffer);

/* Close connection */
  fclose(TaskConnection);
  puts("Connection closed\n\n");
  }
=============================================
Task Source:

#define DEBUG 1

#include <stdio.h>
#include <string.h>


#include "d:\dev\dneth\types.h"
#include "d:\dev\dneth\dnfundef.h"
#include "d:\dev\dneth\dn.h"
#include "d:\dev\dneth\socket.h"


int main()
	{
	char *pNodeName, *pBufferAddress;
	int iSocketNumber, iBufferSize;
	
	
	if ((pNodeName = getnodename()) != NULL)
		{
		printf("\nNode Name: %s\n",pNodeName);
		}
	else
		{
		puts("No Local Node Name Returned...");
		puts("Please contact systems officer.");
		return(1);
		}
	// Connect to TEST.EXE on remote node
	if ((iSocketNumber =
dnet_conn("nrnwpr/username/password","test.exe",1,NULL,0,NULL,0)) != -1)
		{
		#ifdef DEBUG
		  puts("Socket Openned...\n");
		  printf("Socket Number: %i\n",iSocketNumber);
		#endif
		}
	else
		{
		puts("Unable to create socket\n");
		return(-1);
		}
			
// Read from TEST.EXE
	sread(iSocketNumber,pBufferAddress,iBufferSize);
		#ifdef DEBUG
			printf("Received %s\n",pBufferAddress);
		#endif
		
// Write to TEST.EXE

	strcpy(pBufferAddress,"Hello from Ron");
	send(iSocketNumber,pBufferAddress,strlen(pBufferAddress),0);

		#ifdef DEBUG
			printf("\nSent %s\n",pBufferAddress);
			printf("\nSize: %i",strlen(pBufferAddress));
		#endif

// Close Socket
	if (sclose(iSocketNumber) == 0)
		{
		#ifdef DEBUG
			puts("\nSocket Closed...\n\n");
		#endif
		}
	else
		{
		puts("Unable to close scoket...\n\n");
		return(-1);
		}
	return(0);
	}
	


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Task-to-Task communications
  1993-09-23 19:16 Task-to-Task communications Ron Loxton
@ 1993-09-24  6:06 ` jeh
  0 siblings, 0 replies; 2+ messages in thread
From: jeh @ 1993-09-24  6:06 UTC (permalink / raw)


In article <1993Sep23.191639.2073@govonca.gov.on.ca>, loxtonr@govonca.gov.on.ca (Ron Loxton) writes:
> Netters:
>
> 	I am attempting to perform task-to-task communication between a
> Vax running
> Pathworks V4.1 and my PC over decnet. I can send data from the VAX task
> to my PC task
> but not the other way (I get a symbolic stack dump).

It is impossible to provide any suggestions with this limited information.

How about posting:

	- a very short, COMPLETE example program that demonstrates the problem
	- a copy of the stack dump from that program
	- at the very least, the ERROR MESSAGE from the stack dump!

Heck, for that matter, you didn't even mention which machine the stack dump
happened on.  (I assume it was the VAX, since PCs usually just lock up under
unanticipated error conditions.)

However... if you're using $QIO[W] to read and write the DECnet link... I can
tell you that the ONLY difference between the read and write calls will be that
the function code changes from IO$_READVBLK to IO$_WRITEVBLK.

I can also tell you that the most common cause of a stack dump is probably an
access violation.  In fact it will say "access violation" near the top of the
display.  The usual cause of an accvio is that you tried to dereference a
pointer that "pointed" to non-existent virtual address space.

	--- Jamie Hanrahan, Kernel Mode Systems, San Diego CA
drivers, internals, networks, applications, and training for VMS and Windows NT
uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and
Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG
Internet:  jeh@cmkrnl.com (JH645)  Uucp: uunet!cmkrnl!jeh  CIS: 74140,2055


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-09-24  6:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-09-23 19:16 Task-to-Task communications Ron Loxton
1993-09-24  6:06 ` jeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox